Skip to content

erin-bristow/erin-bristow.github.io

Repository files navigation

erin-bristow.github.io

Personal blog/resume website using samarsault's texture theme for Jekyll.

https://jekyllrb.com/docs/configuration/

https://github.com/samarsault/texture

Note on Custom Plugins

I wanted to use custom plugins (notably, jekyll-target-blank), but GitHub Pages doesn't allow custom plugins by default, citing security concerns. For more control over your site, including the use of custom plugins, you can deploy your Jekyll site to GitHub Pages with GitHub Actions. Below are a few issues I ran into when following the Jekyll documentation for GitHub Actions. Hopefully this can help you with troubleshooting your own site.

  1. After the gh-pages branch is created, you must switch to the gh-pages branch in the settings for your GitHub Pages repository.
  2. In github-pages.yml, you need to include target_branch: gh-pages but that's the only line I had to change in the documentation's provided github-pages.yml file.
  3. There can be issues with custom domains. The CNAME record will not be automatically placed in the new gh-pages branch, and you cannot manually create the CNAME record file in the gh-pages branch because it will be overwritten every time your site is rebuilt. In your Jekyll _config.xml file you need to add include: CNAME to force Jekyll to include that record in the gh-pages branch.

A final note: Even though GitHub pages is now serving your site off of the gh-pages branch and not master, you still need to be pushing to your master branch. When you push to your master branch, GitHub Actions will automatically build the site in the gh-pages branch. Do not edit the gh-pages branch directly because your changes will not persist when your site is rebuilt.

Jekyll + GitHub Pages on Arch Linux

GitHub Pages uses Ruby 2.7.4 as of Dec 2022. The most recent version of Ruby is 3.1, which Jekyll will use by default. Since I'm using EndeavourOS right now, I needed to downgrade to 2.7 so I could locally run my Jekyll blog. The below steps were mostly taken from this writeup. I must have had to do something similar on Windows, but I think there are a lot more guides for that OS so it was less of a pain.

yay -S ruby2.7 ruby2.6-bundler
alias ruby=ruby-2.7 
alias gem=gem-2.7 
export PATH=/home/$USER/.gem/ruby/2.7.0/bin:$PATH
gem-2.7 install jekyll bundler --user-install

The alias didn't work (I probably forgot to restart my terminal? idk, don't remember) but calling gem-2.7 explicitly was fine.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published