layer5 icon indicating copy to clipboard operation
layer5 copied to clipboard

[hugo] copy static/ PDFs and normalize /static/ prefix

Open PARTH-TUSSLE opened this issue 1 week ago • 2 comments

Parent: #8297

Problem

All 10 unique static PDF files referenced by migrated pages already exist under static/ in the repository, but 404 in the Hugo built site (public/) because static/**/*.pdf is not mounted/copied into Hugo's static/ directory and /static/ prefixes are not stripped.

(Note: relative bundle PDFs such as resources/articles/devops-adoption/devops-adoption-choosing-the-right-metrics.pdf are already copied by migrate-mdx.mjs Pass 1; non-index.mdx bundle-asset publishing is tracked/fixed separately in the leaf-bundle converter PR.)

Unique Static PDFs (10 files, 14 broken links + 1 /static/ import)

# PDF Path (static/...) Broken Links Source Pages (src/collections/...) Exists in Repo?
1 events/2021/kubecon-china-2021/cncf-tag-network-and-service-mesh-working-group-kubecon-china-2021-lee-calcote-ken-owens.pdf 3 blog/2022/2022-01-07-Recap-KubeCon-China-TAG-Network-talk/index.mdx, events/2021/kubecon-china-2021/index.mdx (×2) Yes
2 events/2021/kubecon-china-2021/solving-the-service-mesh-adopters-dilemma-anita-ihuman-kubecon-china-2021.pdf 2 events/2021/kubecon-china-2021/index.mdx (×2) Yes
3 events/2022/hacktoberfest-2022/hacktoberfest-prep-easing-into-cncf-open-source-projects.pdf 1 (+1 /static/ import) events/2022/hacktoberfest-2022/index.mdx, programs/hacktoberfest-2022/index.mdx (/static/events/...) Yes
4 events/2023/hacktoberfest-2023/hacktoberfest-prep-easing-into-cncf-open-source-projects.pdf 2 events/2023/hacktoberfest-prep/index.mdx, programs/hacktoberfest-2023/index.mdx Yes
5 events/2023/hacktoberfest-2023-docker-ext/hacktoberfest-prep-easing-into-cncf-open-source-projects.pdf 1 events/2023/hacktoberfest-2023-docker-ext/index.mdx Yes
6 events/2024/hacktoberfest-2024/hacktoberfest-prep-2024-extending-meshery-models.pdf 1 events/2024/hacktoberfest-2024/index.mdx Yes
7 cncf-tag-network/KubeCon-EU-2024-CNCF-TAG-Network.pdf 1 events/2024/kubecon-EU-2024/index.mdx Yes
8 case-studies/hpe-adoption-of-layer5-meshery-and-kanvas.pdf 1 resources/case-study/hpes-adoption-of-meshery-and-kanvas/index.mdx Yes
9 case-studies/infor-adoption-of-layer5-meshery-and-kanvas.pdf 1 resources/case-study/infors-adoption-of-meshery-and-kanvas/index.mdx Yes
10 case-studies/tcs-labs-adoption-of-layer5-meshery-and-kanvas.pdf 1 resources/case-study/tcs-labs-adoption-of-meshery-and-kanvas/index.mdx Yes

Proposed Fix

  1. Copy or mount static/ PDFs into hugo/static/ (e.g., via module.mounts in hugo/hugo.yaml or Makefile).
  2. Normalize /static/ URL prefixes in hugo/scripts/migrate-mdx.mjs so /static/events/... resolves to /events/....

PARTH-TUSSLE avatar Nov 26 '26 12:11 PARTH-TUSSLE

Hi, I'd like to work on this. Could you assign it to me? I'll open a PR soon.

RjyavardhanSingh avatar Nov 26 '26 14:11 RjyavardhanSingh

Closing as completed !

PARTH-TUSSLE avatar Nov 30 '26 04:11 PARTH-TUSSLE