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

   Fixes #1763.
   
   ## What changed
   
   - `gulp/tasks/generate-markdown.js` now also converts 
`public/blog/<year>/<month>/<post>/index.html`, so every post is published as 
`<post URL>index.md`, e.g. 
`https://camel.apache.org/blog/2026/09/camel-local-model-benchmark/index.md`. 
That is the path the generated `blog/index.md` (from the RSS feed, all 244 
posts) already links to, so the blog index goes from 244 dead links to 244 
working ones without changes.
   - A rendered post is trimmed to what an agent needs: title, one byline 
(`Published 2026-09-15 by Claus Ibsen in AI, Tooling`), the lead, and the body. 
The back link, author avatars, share links, in-post TOC, previous/next, 
featured image and related posts are dropped.
   - `turndown-config.js`: an `<iframe>` becomes a link (`[YouTube 
Video](https://www.youtube-nocookie.com/embed/…)`) instead of being dropped 
silently; 44 posts embed a video.
   - `llms-txt-template.md`: the Blog entry says the index lists every post and 
how to get a post as Markdown.
   - Tests: a full post fixture after `layouts/blog/post.html`, and a bare post 
without rail details.
   
   ## Why convert the HTML instead of copying the source `index.md`
   
   The issue suggested copying the sources. I went with converting the rendered 
HTML, like the documentation pages, because the sources use Hugo shortcodes 
(`{{< youtube >}}` ×44, `{{< image >}}` ×23, `{{< table >}}`), 431 relative 
image references that Hugo resizes and renames, and `draft:`/date rules that 
decide what is published; copying the sources would mean re-implementing all of 
that in gulp. Converting the HTML gets it for free, and the output is clean: 
fenced code blocks keep their language, images resolve relative to the post 
directory, links to other pages are kept.
   
   ## Verification
   
   - `yarn test`: 14 pass.
   - Full `yarn build` from the root: exit 0, no errors. 244 post `index.html` 
→ 244 `index.md`; every link in `public/blog/index.md` resolves to an existing 
file. Spot-checked the local-model benchmark post, a 2020 post with `{{< image 
>}}` figures, and a 2022 post with a YouTube embed.
   
   Note: this touches the same glob in `generate-markdown.js` as #1769 (website 
pages). Whichever merges second needs a trivial conflict resolution; I can 
rebase this one once #1769 is in.
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)


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