Skip to content

Unit 14: portfolio fix — replace 404'ing /assets/js/portfolio.js + static→assets migration#16

Open
stradichenko wants to merge 1 commit intomainfrom
unit-14-portfolio-fix-static-to-assets
Open

Unit 14: portfolio fix — replace 404'ing /assets/js/portfolio.js + static→assets migration#16
stradichenko wants to merge 1 commit intomainfrom
unit-14-portfolio-fix-static-to-assets

Conversation

@stradichenko
Copy link
Copy Markdown
Owner

Summary

  • portfolio.html: replace <script src="/assets/js/portfolio.js"> (which 404s in production because /assets is not published) with a proper resources.Get | js.Build | fingerprint pipeline emitting an SRI integrity attribute.
  • Move the ~160-LOC inline portfolio <script> into the existing assets/js/portfolio.js (or a portfolio-page.js companion).
  • Move static/img/logo.svgassets/img/logo.svg and update partials/header.html to use resources.Get | fingerprint.
  • Move static/images/profile.pngassets/images/profile.png and update layouts/page/about.html to use resources.Get | images.Resize "200x webp".
  • Move static/images/portfolio/**assets/images/portfolio/** (8 images); update portfolio/single.json (already uses resources.Match) and portfolio.html accordingly.
  • Move static/netlify.toml to repo root.
  • portfolio/single.json: replace now.Format with time.Format.

Notes for reviewer

  • ⚠️ Conflicts with Unit 8 on header.html (logo block).

Test plan

  • curl /portfolio/ succeeds.
  • No 404 for /assets/js/portfolio.js (was the original P0 bug).
  • JSON endpoint serves portfolio data.
  • Images convert to WebP via images.Resize.

Part of the PKB-theme modernization batch (15 units).

- portfolio.html: replace <script src="/assets/js/portfolio.js"> (which
  404s in production because /assets is not published) with a proper
  resources.Get | js.Build | fingerprint pipeline emitting an SRI
  integrity attribute.
- Move the ~160-LOC inline portfolio <script> into the existing
  assets/js/portfolio.js (or a portfolio-page.js companion).
- Move static/img/logo.svg -> assets/img/logo.svg; update
  partials/header.html to use resources.Get | fingerprint.
- Move static/images/profile.png -> assets/images/profile.png; update
  layouts/page/about.html to use resources.Get | images.Resize "200x webp".
- Move static/images/portfolio/** -> assets/images/portfolio/**;
  update portfolio/single.json (already uses resources.Match) and
  portfolio.html accordingly.
- Move static/netlify.toml to repo root (or document its real home).
- portfolio/single.json: replace now.Format with time.Format.
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.

1 participant