Skip to content

Serve the blog at the custom domain blog.jaysinh.dev - #103

Merged
ultimatecoder merged 1 commit into
masterfrom
feat/custom-domain-blog-jaysinh-dev
Aug 1, 2026
Merged

Serve the blog at the custom domain blog.jaysinh.dev#103
ultimatecoder merged 1 commit into
masterfrom
feat/custom-domain-blog-jaysinh-dev

Conversation

@ultimatecoder

Copy link
Copy Markdown
Owner

What

Moves the site from the GitHub Pages project-site URL ultimatecoder.github.io/Blog/ to the custom domain https://blog.jaysinh.dev/, served from the same Actions deployment.

Why

The project-site path forced baseurl: "/Blog" through _config.yml and scripts/test. That prefix already caused #100 (tag links 404) and still breaks the root-absolute /favicon.ico and /apple-touch-icon*.png in _includes/head.html:13-22, which resolve against the domain root rather than /Blog/. A custom domain serves from the domain root, so the prefix disappears.

Precedent: the repo served at blog.jaysinh.com via a CNAME file until PR #99 removed it. Same shape, new domain.

Changes

File Change
CNAME (new) blog.jaysinh.dev. Deploy is artifact-based (actions/deploy-pages), and Jekyll copies unknown root files into _site/, so the artifact carries it and GitHub Pages reads it to attach the domain.
_config.yml baseurl: "/Blog"""
_config_production.yml urlhttps://blog.jaysinh.dev, feeding jekyll-seo-tag canonicals and jekyll-sitemap
scripts/test Drop --swap-urls "^/Blog:" — with an empty baseurl, _site/ on disk already matches served paths
scripts/test Ignore www.gweca.ac.in (see below)

What deliberately did not change

  • Tag links. Fix tag links 404 by applying baseurl (Fixes #100) #102 routed them through relative_url, which prepends site.baseurl at build time. With an empty baseurl they render /tags/<tag>/ automatically. Hardcoding /Blog anywhere would produce blog.jaysinh.dev/Blog/tags/... and 404.
  • Posts using {{ site.url }}{{ site.baseurl }}/assets/... (~15 files) — correct for the same reason.

Out-of-scope fix included

http://www.gweca.ac.in 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 in that list. Unrelated to this change, but it fails CI, so it is added to ignore_urls.

Verification

./scripts/test passes: 174 external and 73 internal links, the internal ones now checked without URL rewriting — that is the proof the empty baseurl is self-consistent.

Also confirmed in the built _site/: no /Blog paths remain (only schema.org/BlogPosting, a false positive), CNAME present in the artifact, canonical is https://blog.jaysinh.dev/, tag pages link to /tags/<tag>/ and /tags/<tag>/feed.xml.

Merge order — important

Do not merge until dig +short blog.jaysinh.dev CNAME returns ultimatecoder.github.io. Merging first publishes empty-baseurl content while GitHub still serves it under /Blog/, breaking the live site until the domain attaches.

After merge: Settings → Pages should show the domain from the CNAME file; wait for the DNS check, then enable Enforce HTTPS. .dev is HSTS-preloaded, so the site is unreachable until the certificate issues (10-30 min typical).

🤖 Generated with Claude Code

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/<tag>/ 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 <noreply@anthropic.com>
@ultimatecoder
ultimatecoder merged commit 0bfa654 into master Aug 1, 2026
1 check passed
@ultimatecoder
ultimatecoder deleted the feat/custom-domain-blog-jaysinh-dev branch August 1, 2026 12:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant