davsclaus opened a new pull request, #1891:
URL: https://github.com/apache/camel-website/pull/1891

   Refs #1882
   
   Build and maintenance items from #1882, one commit per area. The 
head-metadata parity (item 4) is left to the SEO work in #1878, and 
`svg4everybody` to the performance work in #1879.
   
   ## Hugo 0.121.2 → 0.169.0
   
   0.169.0 is the newest release that is at least two weeks old. 0.170.x is 13 
days old.
   
   | Change in Hugo | Fix here |
   |---|---|
   | `getJSON` removed | New `layouts/partials/remote-json.html`, built on 
`resources.GetRemote` + `try`, used by the blog author names and all 
release-note issue lists. A 404 returns nothing, as before. Any other failure 
fails the build with `Unable to fetch <url>: … Set GITHUB_TOKEN …, see 
README.md.`, so a release note is never published without its issue list. The 
`Authorization` header is only sent when a token is configured: before, a build 
without one sent empty Basic credentials and got a 403 straight away. |
   | `caches.getjson` / `getcsv` no longer valid | `caches.getresource` (same 
dir, 12h). |
   | Deprecations: `languageCode`, `.Site.Data`, `.Param "date"` | `locale`, 
`hugo.Data`, `.Date`. |
   | Taxonomy `.Name` is now the normalised lower-case term | The blog rail 
linked to `/categories/ai/` while the page is generated at `/categories/AI/`, a 
404 on the case-sensitive server. It now uses the term page's `RelPermalink` 
and `Title`. The rail now shows "Camel K" / "Camel Quarkus", which is the title 
those category pages already had. |
   | Images are decoded by file extension | Four featured images had content 
that did not match their name (one WebP and three PNGs named `.jpg`), and 
resizing them failed. They are renamed. |
   
   I checked the Hugo and archetype pins too: no workflow, the Jenkinsfile or 
the Dockerfile pins a Hugo version, and `hugo new --kind <k>` works for all 8 
archetypes.
   
   Still reported at INFO level, not fixed here: `.Params.summary` and 
`.Params.description` in `layouts/security/list.html` and 
`layouts/security-advisory/single.html`. Those templates are being reworked in 
#1877, and the advisory templates also feed the signed `.txt` files.
   
   ### Old vs new output
   
   Both builds ran with `CAMEL_ENV=production` and a `GITHUB_TOKEN`:
   
   - 3317 files in each.
   - 89 processed images were renamed on each side. Hugo changed the hash 
scheme of resized images (`_hu…_800x0_resize_q95_gaussian.jpg` → 
`_hu_<hash>.jpg`). The 2 renamed originals also differ.
   - 581 files differ byte for byte. After normalising whitespace, 
image-derivative names and the generator tag, 179 still differ. None of them is 
a page that lost content:
   
   | Class | Files | Why |
   |---|---|---|
   | Category rail names and reading time only | 125 | "Camel-K" → "Camel K", 
as above. Hugo's word counter changed, so some cards say 7 min instead of 6. |
   | RSS feeds (`index.xml`) | 30 | The built-in RSS template now puts the HTML 
summary, escaped, in `<description>` instead of plain text, and the generator 
string is now just "Hugo". |
   | YouTube embeds | 13 | The built-in shortcode now adds `allow`, 
`referrerpolicy` and `loading` and spells out the player parameters. Still 
`youtube-nocookie.com`. |
   | Code highlighting | 7 | Newer Chroma: empty `<span class="w">` is dropped, 
and `rego` blocks are now highlighted. |
   | Table alignment | 3 | `style="text-align:right"` → `text-align: right`. |
   | Other | 3 | A Goldmark fix: an autolink no longer swallows a trailing `)` 
(`…/docs%29` → `…/docs`). One heading ID with `&nbsp;` changed; nothing links 
to it. The built-in `figure` shortcode now resolves page-bundle images (same 
file, relative path). |
   
   The release notes match exactly: 19937 resolved-issue entries in both 
builds, and 269 posts with author cards in both.
   
   ## html-validate 8.29 → 11.21
   
   - **Preset name:** it is now `html-validate:recommended`. The old 
`htmlvalidate:` prefix no longer resolves.
   - **JSON-LD rule:** html-validate 9 removed the plugin `setup(source)` hook. 
After that, `camel/structured-data` read an undefined source and checked 
nothing, with no error. It now reads the script from the DOM. I checked it with 
a page that has broken JSON-LD.
   - **Speed:** the Hugo pages take 2.1 s instead of 7 s.
   - **`aria-label-misuse`:** in a 255-page sample of the live docs, v11 
reports `aria-labelledby` on a plain `<div>` 439 times. Every hit is the static 
tab-panel markup from `@asciidoctor/tabs`, whose script adds `role=tabpanel` at 
runtime. The rule now skips `<div>` and keeps checking every other element.
   - **`components/*/others/diagram.html` is ignored:** that page has the only 
other new finding. The alt texts in camel-diagram's `diagram.adoc` 
(apache/camel) contain unquoted commas, so Asciidoctor turns the text after 
them into `width`/`height` values. The ignore entry says to remove it once 
apache/camel quotes them, e.g. `image::ROOT:x.png["A route diagram: a, b"]`.
   
   ## Antora 3.2.0 → 3.2.3
   
   The `^3.1.15` range already resolved to 3.2.0. The range is now `^3.2.2`, 
which resolves to 3.2.3. This is a patch update.
   
   ## Cleanup
   
   - **`netlify.toml`:** Netlify never builds the site. `pr.yaml` builds it, 
and `preview.yaml` uploads `public/` with `netlify deploy --no-build`. The 
`yarn build-all` command and `YARN_VERSION=1.22.5` were dead, so I removed 
them, along with the asset post-processing setting, a feature Netlify has 
removed.
   - **`antora-ui-camel/package.json`:** removed the `dependenciesMeta` for 
`[email protected]`. The dependency is `~11`.
   - **`head-scripts.hbs`:** removed. It only held the Google Analytics 
snippet. No playbook sets `site.keys.googleAnalytics`, and the CSP would block 
googletagmanager.com anyway.
   
   ## `.htaccess`
   
   `static/.htaccess` is the source. `gulp htaccess` only injects the docs 
redirects into it.
   
   | Header | Before | After |
   |---|---|---|
   | `Vary` on HTML | `Accept-Encoding` | `Accept, Accept-Encoding` |
   | `Strict-Transport-Security` | `max-age=16070400; includeSubDomains` (in 
this file) | `max-age=31536000; includeSubDomains; preload` |
   | `X-XSS-Protection` | `1; mode=block` | `0` |
   | `Referrer-Policy` | `no-referrer-when-downgrade` | 
`strict-origin-when-cross-origin` |
   | `Permissions-Policy` | none | `camera=(), microphone=(), geolocation=()` |
   | `Cross-Origin-Opener-Policy` | none | `same-origin-allow-popups` |
   
   - **`Vary`:** mod_rewrite only adds `Vary: Accept` when the Markdown 
negotiation rewrites. Live, the Markdown response has it and the HTML response 
of the same URL does not. The site is behind Varnish, so a cached HTML copy 
could be served to an agent asking for Markdown.
   - **HSTS:** the new value is what live already serves, set by ASF infra for 
apache.org.
   - **X-XSS-Protection:** `0` is what OWASP recommends.
   - **Tested** on a local Apache 2.4.67 with the rewritten file:
   
     | Request | Response |
     |---|---|
     | HTML | `Vary: Accept` and the new headers |
     | Markdown | `Vary: Accept` (not doubled) |
     | `/` asking for Markdown | `llms.txt` |
   
   - **CSP:** unchanged (#1427).
   
   ## Weekly external link check
   
   - **Workflow:** `.github/workflows/link-check.yml` runs lychee over 
`content/**/*.md` every Monday and on `workflow_dispatch`, only on 
`apache/camel-website`.
     - It uses `lycheeverse/lychee-action` v2.9.0, pinned to `e7477775…`, which 
is the commit on the ASF allowlist.
     - The report goes into a single open issue. Later failing runs update that 
issue, and the issue is closed once all links pass.
     - It doesn't run on PRs, so an external site going down can't fail an 
unrelated change.
   - **`lychee.toml`:**
     - Only http(s) links outside camel.apache.org are checked. Root-relative 
links resolve to the site and are skipped, because `yarn check:links` checks 
those on every PR.
     - Code blocks are skipped.
     - 403, 429 and 999 are accepted: bot protection, rate limits and LinkedIn.
   - **Dry run:** a local run with lychee 0.24.2 over all content found 138 
problems: 105 × 404, 17 connection/TLS errors, 5 timeouts, 5 redirect loops and 
others. Most are user-story and article links. The report is 23 KB, well within 
the issue body limit. Expect the first run to open that issue.
   
   ## README
   
   The README already listed `GITHUB_TOKEN`. It now also says:
   
   - what uses the GitHub API;
   - what the error looks like without a token;
   - that a token without scopes is enough;
   - how to reuse the GitHub CLI token: `GITHUB_TOKEN=$(gh auth token) yarn 
build:hugo`;
   - that responses are cached for 12 h.
   
   ## Verification
   
   - `yarn test`: 23/23. `antora-ui-camel`: `gulp lint`, `gulp test` (33/33) 
and `gulp bundle` all pass.
   - Hugo old/new diff: see the tables above.
   - `yarn check:html` (v11) on the minified Hugo output of both builds: clean.
   - A full local `yarn build` + `yarn checks`, including Antora, is still 
running. CI runs `build-all` + `checks` as well.
   
   ## Follow-ups (not in this PR)
   
   - **apache/camel:** quote the alt texts in 
`components/camel-diagram/src/main/docs/diagram.adoc`, then drop the 
`.htmlvalidateignore` line.
   - **Release-note issue lists:** the GitHub ones fetch 
`issues?state=closed&milestone=N` without `per_page`, so they show at most 30 
issues. That limit existed before this PR, and I kept it so the output stays 
identical.
   - **Security templates:** move them to `.RawSummary` / `.Description` once 
#1877 lands.
   - **Head metadata parity:** Hugo vs Antora, part of #1878.
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)
   
   https://claude.ai/code/session_016Y4dDj46SB6GniXf8mX2U6
   


-- 
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