Skip to content

rendall/rendall.dev

Repository files navigation

rendall.dev

Website for rendall.dev

CC BY-NC-ND 4.0

Magic instructions

Blog

  • Create a blog post by adding a markdown file to _src/blog/posts and pushing it to the master branch.

CV

Site structure

Build

yarn run build

11ty static site generator

This site is built using 11ty. The build process is non-default There are two eleventy builds, one for the https://rendall.dev site and the other for the https://blog.rendall.dev blog.

Local development

The command yarn run start will create a server at http://localhost:8080 for local development. This command runs two servers concurrently, one for the blog and the other for the homepage. Put:

Images

To use srcset for any image, put it in the ./static directory and run the command node ./build-scripts/optimize-images.js. This will take any image in ./static (that is not in ./static/icons/ - that directory is excluded) and optimize, resizing them. It will output to screen an image tag like this, suitable for adding to the HTML.

<img src="/images/rendall.png" srcset="/images/rendall-360w.png 360w, /images/rendall-480w.png 480w, /images/rendall-800w.png 800w">

Better to do it manually. Adding this to the build process, especially via webpack, is a path to darkness and despair.

Deployment

  • Commit changes into a git change branch with an arbitrary name
    • git checkout staging && git pull
    • git checkout -b <change branch name>
  • Pull request against the staging branch
    • These commands will make your life easier:
    • git checkout staging && git pull
    • git fetch origin master:master
    • git rebase --reapply-cherry-picks master
    • git push --force
  • When ready merge the PR into the staging branch, preserving history
  • Pull request from staging against master
  • When ready squash the PR into master, flattening history

Todo

  • More pleasing visual design
  • Add 'Next' and 'Previous' links in blog posts
  • Add serviceworker, especially to cache Montserrat webfont
  • E2E testing
  • Automate propogation of CV changes