How I build this
I’m using the jekyll static site generator using the jekyll-theme-console theme. I put together a basic systemd service to autobuild the site when I change a source file. Here’s what the service file contains:
[Unit]
Description=Jekyll build for my webpage
After=network.target
[Service]
Type=simple
WorkingDirectory=/home/jeffers0n/site
ExecStart=/usr/bin/bundle exec "jekyll build --watch"
Restart=always
[Install]
WantedBy=multi-user.target
I also have jekyll include my town feels instead of using the feels built in html. I wrote some ruby code to build the feels page:
#!/usr/bin/env ruby
def format_date(name)
"#{name[4,2]}/#{name[6,2]}/#{name[0,4]}"
end
output = <<~FRONT
---
layout: page
title: /feels
permalink: /feels/
---
feels
=====
My entries using [town feels](https://tilde.town/~endorphant/ttbp/).
Don't expect "good" writing here. This is just personal journal type material.
FRONT
text_files = Dir.children('/home/jeffers0n/site/feels').sort.reverse
text_files.each do | file |
output += "## #{format_date(file)}\n"
output += "{% include_relative feels/#{file} %}\n\n"
end
File.write('/home/jeffers0n/site/feels.md', output)
I just have cron run this script every hour. I could do something fancy using inotify but… I didn’t.