Skip to content

Commit

Permalink
add netlify build program
Browse files Browse the repository at this point in the history
  • Loading branch information
benjamingwynn committed Apr 3, 2024
1 parent 7af6cc7 commit c43ba4c
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ node_modules/
final.html
pnpm-lock.yaml
out/
notes/
notes/
index.html
20 changes: 20 additions & 0 deletions build/netlify.mjs
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)

0 comments on commit c43ba4c

Please sign in to comment.