Polish portfolio media, metadata, and error handling - #21
Merged
Conversation
zcohen-nerd
commented
Jul 23, 2026
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]>
Contributor
There was a problem hiding this comment.
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.jswith 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> |
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.