So I decided to go with Jekyll, a Ruby based static site generator. I created a new website for my book group, using a gem that makes it easy to autogenerate Amazon affiliate URLs with the Product Advertising API.
I open sourced the project in case anyone else wants to build a book club website, or any other type of website that uses Amazon affiliate links.
My beloved book group website is getting the dreaded “not mobile-friendly” warning from Google. That’s because the site was built when “RWD” meant “rear-wheel drive,” not “responsive web design!” But challenge accepted – I will rework the site, and its 17 years of book choices – to be compatible with the modern web. And you, dear reader, will be lucky enough to follow my adventure!
The cool kids are using Hugo to build static websites, so I wanted to give it a try myself. It was easy enough to use locally, but the instructions on the website for Hugo hosting on Github pages were too complicated for me. So I used what I think is a simpler workflow, and documented it in my site’s README.md. Here you go:
- Install Hugo.
hugo new site my-site-name
to create the site. Change directory to my-site-name.
- Grab a template you like from HugoThemes. Create the directory themes and install it there.
hugo server -w
to start looking at your site locally. Add content until you’re happy.
- Fiddle with config.toml until you’re happy. Remember you have to restart “hugo server” each time you change configuration; the LiveReload doesn’t handle this.
- Create a .gitignore and add “public” to it.
- Add your site to a new git repository. For reference, mine is https://github.com/scottcwilson/hugosite.
to generate the final copy of your site. (I assume you have added your template to the config.toml file; if not, you will need to use “hugo -t your-template”.) Change directory to “public”.
- Add this directory to a new repository, with the name your-github-name.github.io. Again, for reference, mine is https://github.com/scottcwilson/scottcwilson.github.io.
- You’re done! Your site will be live shortly at http://your-github-name.github.io.