Change jekyll-archive ↔ Liquid-based category/tag

1 minute read

GitHub Pages build does not allow jekyll-archive, which creates a separate page for each category and tag. Instead, one can use Liquid-based category and tag archive pages, using URI bookmark to jump to the requested group on the long page. So if switching back to GitHub Pages from another hosting service or CI build, you need to change any links in Markdown (or HTML) that omit the #.

Make a git commit right before this, then use git diff to be sure the correct changes were made.

jekyll-archive to Liquid

Example: blog has links to category/sailing using jekyll-archive, but is switching to Liquid-based archive pages. Change all pages with a single command (be sure to have a backup!) by

find _posts -type f -name "*.md" -exec sed -i 's,](/category/,](/category/#,g' {} +


find _posts -type f -name "*.md" -exec sed -i 's,](/tag/,](/tag/#,g' {} +

Liquid to jekyll-archive

find _posts -type f -name "*.md" -exec sed -i 's,](/category/#,](/category/,g' {} +


find _posts -type f -name "*.md" -exec sed -i 's,](/tag/#,](/tag/,g' {} +

Switching between GitHub Pages and GitLab Pages

  1. copy files to new directory as appropriate
  2. set .git/config to point to the new git host
  3. set _config.yml to point to the new git repo
  4. be sure your site has transferred (git push) to the new site. Access it at or to be sure it works
  5. update your DNS records to point at new host. If using CloudFlare (it’s free) you can use CNAME flattening

For GitLab Pages: CNAME
www         CNAME

For GitHub Pages: CNAME
www         CNAME




Leave a Comment