Skip to content

Polish portfolio media, metadata, and error handling - #21

Merged
zcohen-nerd merged 1 commit into
mainfrom
portfolio-step-5-final-polish
Jul 23, 2026
Merged

Polish portfolio media, metadata, and error handling#21
zcohen-nerd merged 1 commit into
mainfrom
portfolio-step-5-final-polish

Conversation

@zcohen-nerd

Copy link
Copy Markdown
Owner
  • SENTRY media: remaining images converted/renamed (WebP where it wins, PNG kept for schematic/PCB line art where it compresses better); inline page media 2.18 MB -> 961 KB with full-resolution versions behind labeled new-tab links; originals in source-assets/
  • Zero publicly served filenames contain spaces (was 14); orphaned assets moved to source-assets/; no compatibility copies (new domain, documented)
  • Raw-image click surprises removed: full-res links kept only for labeled diagrams/schematic, each visibly labeled with target=_blank rel=noopener noreferrer
  • Titles: site "Zac Cohen Portfolio", homepage deduplicated, FRC shortened
  • Six page-specific 1200x630 OG cards (committed generator script) wired via frontmatter for SENTRY/SPARK/FSB/Teaching/Writing/FRC
  • Custom 404 (swizzled NotFound/Content) with useful links
  • Surfer Fleet stub reviewed; recommended Cloudflare 301 documented (no restoration; ORCID not added - none verified; no FIRST photos exist in workspace)
  • Validator: spaced-filename ban, stale-ref bans, 961 KB SENTRY media budget check, labeled-link check, title dedup, OG existence + 1200x630 dimension parsing, custom-404 assertions

- SENTRY media: remaining images converted/renamed (WebP where it
  wins, PNG kept for schematic/PCB line art where it compresses
  better); inline page media 2.18 MB -> 961 KB with full-resolution
  versions behind labeled new-tab links; originals in source-assets/
- Zero publicly served filenames contain spaces (was 14); orphaned
  assets moved to source-assets/; no compatibility copies (new
  domain, documented)
- Raw-image click surprises removed: full-res links kept only for
  labeled diagrams/schematic, each visibly labeled with
  target=_blank rel=noopener noreferrer
- Titles: site "Zac Cohen Portfolio", homepage deduplicated, FRC
  shortened
- Six page-specific 1200x630 OG cards (committed generator script)
  wired via frontmatter for SENTRY/SPARK/FSB/Teaching/Writing/FRC
- Custom 404 (swizzled NotFound/Content) with useful links
- Surfer Fleet stub reviewed; recommended Cloudflare 301 documented
  (no restoration; ORCID not added - none verified; no FIRST photos
  exist in workspace)
- Validator: spaced-filename ban, stale-ref bans, 961 KB SENTRY media
  budget check, labeled-link check, title dedup, OG existence +
  1200x630 dimension parsing, custom-404 assertions

Co-Authored-By: Claude Fable 5 <[email protected]>
Copilot AI review requested due to automatic review settings July 23, 2026 13:15
@zcohen-nerd
zcohen-nerd merged commit aa3deac into main Jul 23, 2026
1 check 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 performs final “Step 5” polish work on a Docusaurus-based portfolio site: optimizing/renaming media assets, tightening metadata (titles + OG cards), adding a custom 404 experience, and expanding the post-build validator to prevent regressions.

Changes:

  • Optimized and renamed inline media (removing spaced filenames) and updated affected page markup to use the new asset paths + labeled full-resolution links.
  • Updated site/page metadata: site title, per-route Open Graph images (1200×630) via frontmatter, and a generator script for OG cards.
  • Added a custom 404 content component and expanded scripts/validate-build.js with Step 5-specific guards.

Reviewed changes

Copilot reviewed 13 out of 43 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
STEP_5_PORTFOLIO_POLISH_REPORT.md Documents Step 5 scope, decisions, measurements, and validation coverage.
src/theme/NotFound/Content/index.js Adds custom 404 body content with helpful internal/external links.
src/pages/index.md Updates homepage title and swaps a spaced/old image ref for optimized WebP.
src/pages/frc.md Adds OG image frontmatter and shortens the page title.
src/pages/teaching/index.md Adds route-specific OG image frontmatter.
src/pages/documentation/index.md Adds route-specific OG image frontmatter.
src/pages/projects/index.md Updates a projects card image to the renamed/optimized asset with explicit dimensions.
src/pages/projects/fusion-system-blocks.md Adds route-specific OG image frontmatter.
src/pages/projects/stlink-v3mods.md Adds route-specific OG image frontmatter.
src/pages/projects/sentry-v3.md Updates SENTRY page media (new filenames/formats) and adds labeled full-res links for key diagrams.
scripts/validate-build.js Adds Step 5 validation guards (spaced filename ban, stale refs, SENTRY media budget, OG checks, custom 404 checks).
scripts/generate-og-pages.ps1 Adds a generator for per-route OG cards in static/img/og/.
docusaurus.config.js Updates the global site title string.
source-assets/Supporting Systems.png Stores preserved original asset in source-assets/.
source-assets/Protection Layer.png Stores preserved original asset in source-assets/.
source-assets/How I Build Systems.png Stores preserved original asset in source-assets/.
source-assets/Functional Block Diagram.png Stores preserved original asset in source-assets/.
Comments suppressed due to low confidence (3)

src/pages/projects/sentry-v3.md:85

  • This full-resolution link hardcodes the production domain, which breaks portability (e.g., local/staging builds open the live site). Use a root-relative href so it works in any deployment.
<p style="text-align: center; margin: -0.75rem 0 1.5rem;"><a href="https://portfolio.zcohen-nerd.com/assets/images/projects/SENTRY/sentry-turret-cross-section-labeled.webp" target="_blank" rel="noopener noreferrer">Open full-resolution labeled cross-section in a new tab →</a></p>

src/pages/projects/sentry-v3.md:101

  • This full-resolution link hardcodes the production domain. Using a root-relative href keeps the link working in preview/local builds and if the origin changes.
<p style="text-align: center; margin: -0.75rem 0 1.5rem;"><a href="https://portfolio.zcohen-nerd.com/assets/images/projects/SENTRY/sentry-pcb-labeled.webp" target="_blank" rel="noopener noreferrer">Open full-resolution labeled PCB in a new tab →</a></p>

src/pages/projects/sentry-v3.md:107

  • This full-resolution link hardcodes the production domain. Use a root-relative href so the link resolves against whatever host/baseUrl the site is deployed with.
<p style="text-align: center; margin: -0.75rem 0 1.5rem;"><a href="https://portfolio.zcohen-nerd.com/assets/images/projects/SENTRY/sentry-schematic.png" target="_blank" rel="noopener noreferrer">Open full-resolution schematic in a new tab →</a></p>

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +72 to +75
$out = Join-Path $outDir $p.file
$bmp.Save($out, [System.Drawing.Imaging.ImageFormat]::Png)
$g.Dispose(); $bmp.Dispose()
Write-Output ("wrote {0}" -f $p.file)
</a>
<img src="/assets/images/projects/SENTRY/sentry-turret-labeled.webp" alt="SENTRY V3 labeled CAD view" width="1942" height="1000" style="display: block; width: auto; max-width: 100%; max-height: 420px; height: auto; border-radius: 8px; margin: 1rem auto 1.5rem;" loading="lazy">

<p style="text-align: center; margin: -0.75rem 0 1.5rem;"><a href="https://portfolio.zcohen-nerd.com/assets/images/projects/SENTRY/sentry-turret-labeled.webp" target="_blank" rel="noopener noreferrer">Open full-resolution labeled view in a new tab →</a></p>
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