KAFKA-20541 : Move 42/generated from static/ to content/#856
KAFKA-20541 : Move 42/generated from static/ to content/#856muralibasani wants to merge 3 commits into
Conversation
|
Thanks for picking this up. I guess I should put some thoughts in the Jira when opening it. While your PR resolve the duplication, I'm not sure it's the approach we should take to resolve this. When we generate docs for a release, the I wonder if the website should pick |
@mimaison pls let me know if the below approach is better to handle this situation. Currently there are a few empty files in content/en/42/generated too. Finally update the release playbook, so for 4.3 onwards, we can keep the generated/ with the docs. We don't have to copy it to the static folder. I tested this locally and it works. |
Previously, content/en/42/generated/ held empty stubs while the real HTML fragments and connect_rest.yaml lived in static/42/generated/. Move the files to content/en/42/generated/ so the layout matches apache/kafka's docs/generated, and add a module.mounts entry in hugo.yaml that re-exposes them at /42/generated/ so the download URL for connect_rest.yaml is unchanged. - include-html shortcode reads from content/en/<v>/generated/, with a fallback to /static/... for pre-4.2 versions - 24 include-html calls in content/en/42 switched to the short form - replace-version-links.sh and README/CLAUDE.md updated for the new release workflow (don't copy generated/ into static/)
|
@mimaison pushed the changes too. It's a large PR, but mostly moving of files to content dir, and handling the include-html shortcode. |
|
Yes I think something along these lines would work. Thanks for figuring it out. I'm wondering whether we should keep all existing versions as is, at least for now, and only start with the new scheme for newer versions. So we'd do the changes in the kafka repository instead. Also it seems the new process requires editing hugo.yaml for each release, could we invert the process to include mapping all existing versions, and not require changes for new releases? |
@mimaison new changes now handle only newer versions and no edits are required for hugo config going fwd. And for new releases: copy docs/ into content/en// and images/javadoc into static//, catch-all will take care. |
module.mountsentry inhugo.yamlso future Kafka releases that shipdocs/generated/undercontent/en/<v>/generated/(the layout used byapache/kafka) are served at/<v>/generated/URLs automatically/42/generated/connect_rest.yamlstill downloads the original filecontent/en/99/generated/test.htmlwhich is served at/99/generated/test.html