-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7af6cc7
commit c43ba4c
Showing
2 changed files
with
22 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,4 +2,5 @@ node_modules/ | |
final.html | ||
pnpm-lock.yaml | ||
out/ | ||
notes/ | ||
notes/ | ||
index.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
/** @format */ | ||
|
||
import fsp from "fs/promises" | ||
import {getVersion} from "./common.mjs" | ||
|
||
function makeDownloadUrl(tag) { | ||
return `https://github.com/benjamingwynn/cv/releases/download/${tag}/cv-2024-${tag}.pdf` | ||
} | ||
|
||
const url = makeDownloadUrl(getVersion()) | ||
const html = ` | ||
<!doctype html> | ||
<head> | ||
<meta http-equiv="Refresh" content="0; url='${url}'" /> | ||
</head> | ||
<body> | ||
<p style="font-family: system-ui, sans-serif">Please <a href="${url}">click here</a> to download the PDF</p> | ||
</body> | ||
` | ||
await fsp.writeFile("./index.html", html) |