Harden portfolio SEO and shared infrastructure - #15
Merged
Conversation
- trailingSlash: true matching live GitHub Pages directory URLs; sitemap entries use final non-redirecting form - onBrokenLinks/onBrokenMarkdownLinks: throw — the 17 image-lightbox anchors with site-local /assets/ hrefs (route-checker false positives) now use absolute production URLs so strict mode passes - Repo-controlled permissive robots.txt with Sitemap directive - ProfilePage JSON-LD anchored to the shared hub Person identity - scripts/validate-build.js: 26 post-build assertions (canonical, OG, JSON-LD, sitemap policy, robots, resume, Surfer Fleet redirect-only, Batch B publication facts, legacy-URL bans, navigation a11y statics) wired into the deploy workflow - BATCH_C_INFRASTRUCTURE_REPORT.md documents the full batch Brand dependency stays file: until @zcohen-nerd/[email protected] is published; CI brand-clone removal is the post-publish follow-up. Merge order: brand PR first (CI validation asserts new nav markup). Co-Authored-By: Claude Fable 5 <[email protected]>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR hardens the Docusaurus-based portfolio’s SEO and deployment infrastructure by enforcing canonical/trailing-slash policy, enabling strict broken-link behavior, adding repo-owned crawl directives, and introducing post-build validation that is wired into the Pages deploy workflow.
Changes:
- Enforce
trailingSlash: trueand strict broken-link handling; add ProfilePage JSON-LD inheadTags. - Add permissive
robots.txtwith a Sitemap directive and update image-lightbox anchors to use absolute production URLs. - Add
scripts/validate-build.jsand run it in CI afternpm run buildto assert canonical/metadata/sitemap/robots/content invariants.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| static/robots.txt | Adds repo-controlled permissive robots policy with Sitemap directive. |
| src/pages/projects/stlink-v3mods.md | Converts image-lightbox anchor hrefs to absolute production URLs. |
| src/pages/projects/sentry-v3.md | Converts image-lightbox anchor hrefs to absolute production URLs. |
| src/pages/projects/fusion-system-blocks.md | Converts image-lightbox anchor href to absolute production URL. |
| src/pages/index.md | Converts homepage diagram lightbox anchor href to absolute production URL. |
| scripts/validate-build.js | Introduces post-build assertions for canonical/OG/JSON-LD/sitemap/robots/resume/redirect/content/a11y statics. |
| docusaurus.config.js | Enables trailing-slash policy, strict broken-link mode, and adds ProfilePage JSON-LD. |
| BATCH_C_INFRASTRUCTURE_REPORT.md | Documents Batch C infrastructure scope, decisions, and follow-ups. |
| .github/workflows/deploy.yml | Runs the new post-build validation script as part of the build job. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+25
to
+28
| const cname = fs.readFileSync(path.join(root, 'static', 'CNAME'), 'utf8').trim(); | ||
| const indexHtml = fs.readFileSync(path.join(build, 'index.html'), 'utf8'); | ||
| const sitemap = fs.readFileSync(path.join(build, 'sitemap.xml'), 'utf8'); | ||
| const robots = fs.readFileSync(path.join(build, 'robots.txt'), 'utf8'); |
|
|
||
| // Canonical | ||
| check('CNAME is portfolio subdomain', cname === 'portfolio.zcohen-nerd.com', `got "${cname}"`); | ||
| check('canonical link uses portfolio domain', indexHtml.includes(`rel="canonical" href="${DOMAIN}/"`)); |
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.
Brand dependency stays file: until @zcohen-nerd/[email protected] is published; CI brand-clone removal is the post-publish follow-up. Merge order: brand PR first (CI validation asserts new nav markup).