Serve the blog at the custom domain blog.jaysinh.dev - #103
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Moves the site from the GitHub Pages project-site URL
ultimatecoder.github.io/Blog/to the custom domainhttps://blog.jaysinh.dev/, served from the same Actions deployment.Why
The project-site path forced
baseurl: "/Blog"through_config.ymlandscripts/test. That prefix already caused #100 (tag links 404) and still breaks the root-absolute/favicon.icoand/apple-touch-icon*.pngin_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.comvia aCNAMEfile until PR #99 removed it. Same shape, new domain.Changes
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.ymlbaseurl: "/Blog"→""_config_production.ymlurl→https://blog.jaysinh.dev, feedingjekyll-seo-tagcanonicals andjekyll-sitemapscripts/test--swap-urls "^/Blog:"— with an empty baseurl,_site/on disk already matches served pathsscripts/testwww.gweca.ac.in(see below)What deliberately did not change
relative_url, which prependssite.baseurlat build time. With an empty baseurl they render/tags/<tag>/automatically. Hardcoding/Bloganywhere would produceblog.jaysinh.dev/Blog/tags/...and 404.{{ site.url }}{{ site.baseurl }}/assets/...(~15 files) — correct for the same reason.Out-of-scope fix included
http://www.gweca.ac.inreturns 200 to curl over both HTTP and HTTPS but 415 to htmlproofer — the same bot/WAF blocking already recorded asci-blockfor other hosts in that list. Unrelated to this change, but it fails CI, so it is added toignore_urls.Verification
./scripts/testpasses: 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/Blogpaths remain (onlyschema.org/BlogPosting, a false positive),CNAMEpresent in the artifact, canonical ishttps://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 CNAMEreturnsultimatecoder.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
CNAMEfile; wait for the DNS check, then enable Enforce HTTPS..devis HSTS-preloaded, so the site is unreachable until the certificate issues (10-30 min typical).🤖 Generated with Claude Code