alexwlchan.net

alexwlchan.net

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

alexwlchan.net

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
  • 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 main branch publishes the change to Netlify.

Building the site

You need Git, Ruby, and Python installed.

To run a local copy of the site:

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

$ python3 -m venv .venv
$ pip install -r requirements.txt

$ bundle install

$ bundle exec jekyll 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:

$ bundle exec jekyll build

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:

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

  • Except where otherwise noted, the site and the associated code are dual-licensed as:

    If you're reusing my content, you can use whichever licence is most appropriate.

    Mostly the CC BY is fine, but Creative Commons licenses aren't suitable for code, so I have MIT as an alternative.

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

  • All the icons on the site are used under a royalty-free license from The Noun Project; there should be comments in the SVG files indicating their source. The original icon authors retain copyright.