alexwlchan.net icon indicating copy to clipboard operation
alexwlchan.net copied to clipboard

Source code and plugins for my website, a static site built with Jekyll

alexwlchan.net

build_site

This repo has the code for my personal site, alexwlchan.net, which is a static site built with Jekyll. It includes a number of plugins I've written to customise the site.

Screenshot of the front page of my website

Key tools

The site uses:

  • Jekyll, which generates the HTML pages
  • Sass, for building the CSS and stylesheets
  • Docker, which wraps the local build process
  • GitHub Actions, which builds and deploys the site
  • Netlify, which hosts the site

When I want to make a change, I open a pull request. This triggers a build with GitHub Actions, and as part of the build it checks the HTML with HTMLProofer. This checks for missing alt text, broken links, invalid HTML, and so on.

If the site passes checks, it's automatically merged, and the build on the live branch publishes the change to Netlify.

Building the site

You need Git, make and Docker installed.

To run a local copy of the site:

$ git clone [email protected]:alexwlchan/alexwlchan.net.git
$ make serve

The site should be running on http://localhost:5757. If you make changes to the source files, it will automatically update.

To build a one-off set of static HTML files:

$ make html

This creates a set of HTML files in _site.

How the site works

I publish the source code so other people can see how the site works, and maybe use some of the ideas for their own sites. This is a list of things that I think are interesting or unusual:

  • Builds in Docker
  • Atom feed generation
  • Stylesheets and other theming settings
  • Month and year archives
  • No-JavaScript Twitter embeds
  • Linking to my work on other sites
  • Validating the front matter in Markdown files

Contributing

Fixes for typos are welcome, but otherwise contributions will be ignored.

If you want to use any of the components in your own projects – plugins, layouts, stylesheets – feel free to do so.

License

  • Original prose is CC-BY licensed; original code is MIT.

    That's because this is a mixture of prose content (blog posts) and code (both the repo itself, and code I write about). I like CC-BY for the prose content, but Creative Commons licenses aren't suitable for code, so for that I use the same MIT license I do for my other open-source code.

  • Some images that are being used under Creative Commons licenses from other people; see the post where an image is used for attribution.

  • Some icons are being used under a royalty-free license from The Noun Project; there should be comments in the SVG files indicating their source.