Now that I sort of went back to hugo on the other blog, of course Kev introduces Pure Comments. Now what am I supposed to do? 😁
Tag: pure-blog
Testing content migration from Hugo, just in case
Just to be clear, I don't have serious plans to migrate my main Baty.net (Hugo) blog to Pure Blog. That doesn't mean I won't explore the "But what if I converted baty.net to Pure Blog?" scenario.
Things will be wonky while I tinker. Probably don't link to anything here, since I'm almost certain the links will break.
Some things I've noticed:
- Date formats in YAML are inconsistent with different SSGs. For example, Hugo wants
date: 2026-02-05 05:29:52 -0500and Pure Blog usesdate: 2026-02-07 16:25which throws an error in Hugo. Adding seconds to the date fixes it. - Quoted strings in YAML front matter are optional. Many of my Hugo posts do quote the title: attribute using either single or double quotes. Would need to be removed, because in Pure Blog, those quotes are included as part of the title, etc. Same goes for tags: ["Tag1","Tag2"] vs [Tag1,Tag2].
Managing Pure Blog updates using just
This has been mostly superceded by the built-in upgrade mechanism introduced in version 1.5.0.
Since everything in Pure Blog is all in one folder, I needed some way to back things up and deploy updates to the code, independent of the content. I use just with a few basic recipies.
Available recipes:
- default - Lists recipies (e.g. just --list)
- backup-to-local - Pulls content, code, and custom config to a dated folder on my local machine
- serve - Run local PHP version of the site
- upgrade - Runs
git pulllocally - deploy - Send just the source php to the server
Here's my justfile so far:
SERVER_HOST := "myserver.com"
SERVER_USER := "myuser"
SERVER_DIR := "/server/path/to/blog"
LOCAL_DIR := "~/local/path/to/blog"
BACKUP_DIR := "~/local/path/to/backups"
BACKUP_DATE := `date +%Y-%m-%d`
PUBLIC_DIR := "{{LOCAL_DIR}}"
TARGET := "Server03"
default:
just --list
serve:
php -S localhost:8000
upgrade:
git pull
backup-to-local:
echo "Backing up to {{BACKUP_DIR}}/{{BACKUP_DATE}}"
rsync -avz {{SERVER_HOST}}:{{SERVER_DIR}}/ \
{{BACKUP_DIR}}/{{BACKUP_DATE}} \
--delete
deploy:
@echo "\033[0;32mDeploying updates to {{TARGET}}...\033[0m"
rsync -v -rz \
--checksum \
--delete \
--no-perms \
--exclude /content/ \
--exclude /config/ \
--exclude /assets/images/ \
--exclude /assets/css/custom.css \
--exclude justfile \
{{LOCAL_DIR}} {{SERVER_USER}}@{{SERVER_HOST}}:{{SERVER_DIR}}
I threw all this together rather quickly, so I'm sure there's more to do. Maybe there's a better way to handle this?
