Skip to content

Harden portfolio SEO and shared infrastructure - #15

Merged
zcohen-nerd merged 1 commit into
mainfrom
portfolio-batch-c-infrastructure
Jul 22, 2026
Merged

Harden portfolio SEO and shared infrastructure#15
zcohen-nerd merged 1 commit into
mainfrom
portfolio-batch-c-infrastructure

Conversation

@zcohen-nerd

Copy link
Copy Markdown
Owner
  • 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).

- 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]>
Copilot AI review requested due to automatic review settings July 22, 2026 12:50
@zcohen-nerd
zcohen-nerd merged commit ab42aa4 into main Jul 22, 2026
1 of 2 checks passed

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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: true and strict broken-link handling; add ProfilePage JSON-LD in headTags.
  • Add permissive robots.txt with a Sitemap directive and update image-lightbox anchors to use absolute production URLs.
  • Add scripts/validate-build.js and run it in CI after npm run build to 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 thread scripts/validate-build.js
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');
Comment thread scripts/validate-build.js

// 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}/"`));
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.

2 participants