Setting up your GitHub Pages site locally with Jekyll under NIX
Written by Bruno BzeznikJekyll is a simple tool to create a static blog-aware website starting from plain text files. A blog post may be a simple mardown file with the date in the filename. Jekyll is the recommended tool for hosting a blog on a Github Page.
This post is about setting up, on a Nix enabled host (NixOS or Nixpkgs), locally your Jekyll site as if it was served by Github, so that you can test your blog posts before commiting.
Here’s what I’ve done to setup Jekyll for github-pages locally on my NiXOS host:
Then, follow Setting up your GitHub Pages site locally with Jekyll from the github help pages.
Note: not in a subdirectory
I tried to setup a Jekyll blog inside a sub-directory of a github-pages site, but it seems impossible because of errors relative to the _includes
directory that should be at the root of the site, but should not be outside of the blog directory if it’s pointed by a symlink.