From 0b147065e5e936aed95f80b43fa223fdfb7c6928 Mon Sep 17 00:00:00 2001 From: Jaysinh Shukla Date: Sat, 1 Aug 2026 17:32:06 +0530 Subject: [PATCH] Serve the blog at the custom domain blog.jaysinh.dev MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The site has been served as a GitHub Pages project site at ultimatecoder.github.io/Blog/, which forced a "/Blog" baseurl through _config.yml and scripts/test. That prefix already caused one production bug (#100, tag links 404) and still breaks the root-absolute favicon and apple-touch-icon paths in _includes/head.html, which resolve against the domain root rather than /Blog/. Point the site at blog.jaysinh.dev instead. The custom domain serves from the domain root, so baseurl becomes empty: * CNAME (new) tells GitHub Pages which domain to attach. The deploy is artifact-based (actions/deploy-pages), and Jekyll copies unknown root files into _site/, so the artifact carries it. * _config.yml drops the "/Blog" baseurl. * _config_production.yml points url at the new host, which feeds jekyll-seo-tag canonicals and the jekyll-sitemap output. * scripts/test no longer needs --swap-urls "^/Blog:" — with an empty baseurl, _site/ on disk already matches the served paths. The 73 internal links now pass unrewritten, which is what proves the change is internally consistent. Tag links need no change: #102 routed them through relative_url, so they pick up the empty baseurl and render as /tags// automatically. Posts referencing {{ site.url }}{{ site.baseurl }}/assets/... resolve correctly for the same reason. Also ignore www.gweca.ac.in in the link checker. It returns 200 to curl over both HTTP and HTTPS but 415 to htmlproofer — the same bot/WAF blocking already recorded as "ci-block" for other hosts. Unrelated to this change, but it fails CI. Co-Authored-By: Claude Opus 5 --- CNAME | 1 + README.md | 4 ++-- _config.yml | 5 ++--- _config_production.yml | 2 +- scripts/test | 12 +++++------- 5 files changed, 11 insertions(+), 13 deletions(-) create mode 100644 CNAME diff --git a/CNAME b/CNAME new file mode 100644 index 0000000..9652596 --- /dev/null +++ b/CNAME @@ -0,0 +1 @@ +blog.jaysinh.dev diff --git a/README.md b/README.md index 4e4b746..094cd84 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ -# Blog - [Jaysinh's own heed](https://ultimatecoder.github.io/Blog/) +# Blog - [Jaysinh's own heed](https://blog.jaysinh.dev/) This repository contains backend tool I use to write and publish my blog. Since begining, I have invested more time in identifying proper flow than writing blog post. * Framework: Jekyll -* URL: https://ultimatecoder.github.io/Blog/ +* URL: https://blog.jaysinh.dev/ * Build/deploy: GitHub Actions ([`.github/workflows/`](.github/workflows)) — every pull request runs a build + link-check ([`ci.yml`](.github/workflows/ci.yml)), and pushes to `master` build and publish to GitHub Pages ([`pages.yml`](.github/workflows/pages.yml)). diff --git a/_config.yml b/_config.yml index 0a554cc..000f00d 100644 --- a/_config.yml +++ b/_config.yml @@ -20,9 +20,8 @@ description: > # this means to ignore newlines until "baseurl:" and an Actor by gene. I write mostly on programming topics. Browse through my blog posts to identify my taste of writing. -# GitHub Pages project site path. Keep in sync with the "^/Blog" prefix -# in scripts/test's --swap-urls, which strips it for local link-checking. -baseurl: "/Blog" # the subpath of your site, e.g. /blog +# Served at the root of the custom domain in CNAME, so there is no subpath. +baseurl: "" # the subpath of your site, e.g. /blog twitter_username: jaysinhp github_username: ultimatecoder diff --git a/_config_production.yml b/_config_production.yml index 88e7a08..f865977 100644 --- a/_config_production.yml +++ b/_config_production.yml @@ -1 +1 @@ -url: "https://ultimatecoder.github.io" # the base hostname & protocol for your site, e.g. https://example.com +url: "https://blog.jaysinh.dev" # the base hostname & protocol for your site, e.g. https://example.com diff --git a/scripts/test b/scripts/test index 534cbaf..069fe35 100755 --- a/scripts/test +++ b/scripts/test @@ -7,8 +7,8 @@ export LANG=en_US.UTF-8 # External URLs htmlproofer should not fail on. Two reasons appear here: # dead — confirmed 404/gone, unrelated to this repo -# ci-block — live (200 from a browser) but returns 403 to GitHub Actions' -# shared runner IPs, i.e. bot/WAF blocking, not a broken link +# ci-block — live (200 from a browser) but returns 403/415 to htmlproofer, +# i.e. bot/WAF blocking, not a broken link ignore_urls=( "https://drive.google.com/file/d/0B_TmiicGbqjHb2ZGcE5QYmtXRHc/view?usp=sharing" # dead "https://reps.mozilla.org/e/maker-party-gujarat/" # dead @@ -17,14 +17,12 @@ ignore_urls=( "https://www.ahduni.edu.in/" # ci-block "https://pythonexpress.in/" # ci-block "https://www.hackerearth.com" # ci-block + "http://www.gweca.ac.in" # ci-block ) # htmlproofer wants a single comma-separated string. ignore_urls_csv=$(IFS=,; echo "${ignore_urls[*]}") -# _site/ is the site root on disk, but pages link internally with the -# "/Blog" baseurl (this is a GitHub Pages project site, not a custom -# domain) — strip it so internal-link checks resolve against ./_site/. -# Keep this "^/Blog" prefix in sync with baseurl in _config.yml. +# baseurl is empty (the site is served at the root of a custom domain), so +# internal links already resolve against ./_site/ with no URL rewriting. bundle exec htmlproofer ./_site/ --only-4xx --no-enforce-https \ - --swap-urls "^/Blog:" \ --ignore-urls "$ignore_urls_csv"