These instructions are also at https://transatomic.github.io/maintenance.md.
Maintenance
Maintaining this site is easy. It’s a github pages site.
This site currently relies on Github’s mechanism to translate markdown to HTML. That
is not required, and may be disabled at any time.
Updating the page
Updating is done with an npm script in package.json.
npm run build
The site will now rebuild itself. Afterwards, just commit as normal.
git add . -A
git commit -m "what changed"
git push origin
Given a minute or two, the site will now update itself.
Changing the theme
Because of the npm automation, there’s an extra step to changing the theme, above and
beyond a normal Github Pages site. (Sorry. It’s fixable, but I’m lazy, and theme changing
is something most people do zero or one times, so, it doesn’t seem worth the effort.)
- First update the theme like you’d expect. Notice that it works.
- Ha! This is software.
- It will fail later when you don’t expect it and don’t remember the relevant context.
- Later, you update the docs and rebuild.
- Wtf? The. The old theme is back?
- That’s because of a step at the end in
package.json- This step copies its clone of the gh pages config, which includes theme, over the existing one
- That’s because nuking the docs folder nukes the gh pages config
- So if you want to change the theme:
- Make the change as normal
- Pull the repo.
- Notice GH has changed
/docs/_config.yml
- Notice GH has changed
- Replace the repo’s
githubpages_config.ymlwith that new_config.yml - Now the build process enforces your new theme instead of the old one
- Huzzah