davsclaus opened a new issue, #1882:
URL: https://github.com/apache/camel-website/issues/1882

   ## Description
   
   Build tooling and test coverage have fallen behind.
   
   ### Outdated tooling
   - `hugo-extended ^0.121.2` resolves to Hugo v0.121.2, built 2024-01-05. 
Upgrading will likely surface template deprecations (e.g. `getJSON` is 
deprecated in favour of `resources.GetRemote`).
   - `html-validate ^8.9.1` is at least one major version behind. Antora 
`^3.1.15` has not been checked.
   
   ### Stale config and dead code
   - `netlify.toml` sets `YARN_VERSION=1.22.5` and a `yarn build-all` command, 
while the repo uses `[email protected]` and previews deploy with `--no-build`.
   - `antora-ui-camel/package.json` has `dependenciesMeta` for 
`[email protected]`, while the dependency is `~11`.
   - The Google Analytics block in 
`antora-ui-camel/src/partials/head-scripts.hbs` is unused (no playbook sets 
`googleAnalytics`).
   - `static/.htaccess`:
     - HSTS is set to `max-age=16070400` (`:1512`), but live serves `31536000; 
includeSubDomains; preload`, so ASF infra overrides it and the file is 
misleading.
     - `x-xss-protection: 1; mode=block` is deprecated (`:1577`); OWASP 
recommends `0` or removing it.
     - `referrer-policy: no-referrer-when-downgrade` (`:1603`) leaks full URLs 
cross-origin; prefer `strict-origin-when-cross-origin`.
     - No `Permissions-Policy` or `Cross-Origin-Opener-Policy`. CSP itself is 
tracked in #1427.
     - `.htaccess` content-negotiates HTML vs `.md` on the `Accept` header. The 
Markdown response sends `Vary: Accept, Accept-Encoding`, but the HTML response 
sends only `Vary: Accept-Encoding`. With longer HTML caching, a cache could 
serve the wrong variant. Add `Header merge Vary Accept` for HTML.
   
   ### Duplicated head templates
   - The Hugo `layouts/partials/header.html` and the Antora 
`head-*.hbs`/`organization-microdata.hbs` each carry their own icons, OG tags 
and JSON-LD, and they have drifted apart (see the SEO ticket).
   
   ### Test and link-check gaps
   - `test/*.js` covers page conversion, unused media, llms.txt and record-cast 
only.
   - `check:links` runs cargo-deadlinks 0.8.1 on `public/` without 
`--check-http`, so only internal links are checked. External links in ~590 blog 
posts and the community pages are never checked. cargo-deadlinks appears 
unmaintained.
   - Nothing catches regressions in meta descriptions, OG tags or canonicals.
   - Building locally without `GITHUB_TOKEN` fails with 200+ GitHub API 
rate-limit errors from the release-note templates (`getJSON` against 
`api.github.com`). The README could mention this.
   
   ## Proposal
   
   1. Upgrade Hugo (and html-validate, Antora if behind) in a dedicated PR and 
fix the deprecations.
   2. Clean up `netlify.toml`, the stale `dependenciesMeta`, the unused GA 
partial and `svg4everybody`.
   3. Align `.htaccess` with what is actually served, and add `Vary: Accept` on 
HTML, `Referrer-Policy: strict-origin-when-cross-origin`, `Permissions-Policy` 
and COOP.
   4. Generate the shared head metadata (icons, OG defaults, Organization 
JSON-LD) for both Hugo and Antora from one data file, or add a parity test.
   5. Add html-validate rules for the head metadata, and a scheduled (non-PR) 
external link check, e.g. lychee, that reports broken links in an issue.
   6. Document `GITHUB_TOKEN` for local builds in the README.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to