This repository contains a collection of Ruby scripts designed to assist with common tasks when managing a Jekyll blog. These scripts help ensure your posts, redirects, and dates are consistent and correctly formatted.
update_redirect_pages.rb
[!NOTE]
This script is particularly useful if you host your Jekyll site on Cloudflare Pages and need to manage redirects for any reason.
This script scans through your Jekyll posts and updates any outdated or improperly formatted slugs in the _redirects
file.
Features:
_redirects
file.Usage:
BASE_URL
and FILE_PATH
in the script../scripts/update_redirect_pages.rb
This script checks for inconsistencies between the date in a post's filename and the date specified in its YAML front matter.
Features:
Usage:
./scripts/check_inconsistent_dates.rb
[!NOTE]
This script is also particularly useful if you host your Jekyll site on Cloudflare Pages and need to verify that redirects are working correctly.
This script verifies the redirects in your _redirects
file by making HTTP requests to the original URLs and checking the response codes.
Features:
Usage:
./scripts/check_redirects.rb
git clone https://github.com/keshavbiswa/useful_jekyll_scripts.git
cd jekyll-utilities
chmod +x scripts/*
Feel free to add new ones or improve existing!