This is my personal website.
Domain is registered through Namecheap.
Hosting is through Cloudflare Pages (static site, project name personalwebsite).
Pre-reqs:
- NPM and NodeJS
- Python3
Running:
- Clone the repository
- Run
npm install - Run
npm run build - Server the
wwwdirectory as the root directory of a webserver (python3 -m http.server)
Deploying is done through Github Actions (.github/workflows/build_frontend.yml). Explained:
- On every push/PR to
master, GHA runsnpm ciandnpm run build - On pushes to
master, GHA uploads the builtwww/directory to Cloudflare Pages viawrangler pages deploy www/is entirely build output (gitignored, wiped bynpm run clean): HTML fromsrc/client/views, CSS fromsrc/client/sass, JS bundles inwww/dist, and static files copied fromsrc/static. Nothing else gets deployed.- Before deploying, CI fails if the build changed any file in the working tree, and it logs the exact list of files being uploaded
- Wrangler is a pinned dependency in
package-lock.json, so the deploy step doesn't install anything during the deploy - Cloudflare Pages serves
foo.htmlat/fooand uses404.htmlfor missing pages automatically
Required GitHub repository secrets:
CLOUDFLARE_API_TOKEN- API token with theAccount > Cloudflare Pages > EditpermissionCLOUDFLARE_ACCOUNT_ID- Cloudflare account ID
Manual deploy from a local machine: npm run build && npx wrangler pages deploy www --project-name=personalwebsite --branch=master
To add a static file (image, robots.txt, etc.), put it under src/static/; it's served at the same path relative to the site root.
Too hands on, can automate this.
- Add
.hbsfile in/viewsdirectory - Add link to URL in the
header.hbsfile - Add compilation file to
build.jsfile - (If Javascript) Add compilation info to Rollup
All of this could 100% be automated away.
-
Easy to write things
-
Flexible frontend, can make experiments
-
timedistance / worldbuilder continue to work and are ported
-
No scss
Things to change about existing site:
-
Colors
-
Favicon (do pixel art yo)
-
Link to my itch.io projects
-
Simplify header
-
lafferty.devin the top left should be a link to the homepage -
rename
dnd worldbuildertoRegion Generator -
Fix scroll down changing the color of the footer
-
delete medieval demographics page
-
delete or rewrite clock tracker
-
inline all unpkg stuff, host scripts directly