Skip to content

Conversation

@lcawl
Copy link
Contributor

@lcawl lcawl commented Dec 31, 2025

This PR fixes a problem that was encountered in https://github.com/elastic/cloud/pull/150210 where the docs-builder changelog render --title "November 2025" option made for poor folder names and poor anchors in the output files.

Summary

Updated the docs-builder changelog render command to format the --title option for folder names and anchors.

All existing tests pass.

Changes made

  • Added TitleToSlug helper method (ChangelogService.cs):
    • Converts titles to slug format: lowercase, spaces replaced with dashes
    • Example: "November 30 2025" → "november-30-2025"
  • Updated RenderChangelogs method:
    • Computes titleSlug from the title
    • Passes both title (display) and titleSlug (URL-friendly) to render methods
  • Updated all three render methods:
    • RenderIndexMarkdown: Uses slug for folder names and anchors, original title for headers
    • RenderBreakingChangesMarkdown: Uses slug for folder names and anchors, original title for headers
    • RenderDeprecationsMarkdown: Uses slug for folder names and anchors, original title for headers

Usage

When the docs-builder changelog render command has --title "November 30 2025", the output has

  • Folder: november-30-2025/
  • Anchor: [elastic-release-notes-november-30-2025]
  • Header: ## November 30 2025 (unchanged)

Generative AI disclosure

  1. Did you use a generative AI (GenAI) tool to assist in creating this contribution?
  • Yes
  • No
  1. If you answered "Yes" to the previous question, please specify the tool(s) and model(s) used (e.g., Google Gemini, OpenAI ChatGPT-4, etc.).

Tool(s) and model(s) used: composer-1 agent

@lcawl lcawl marked this pull request as ready for review December 31, 2025 22:01
@lcawl lcawl requested a review from a team as a code owner December 31, 2025 22:01
@lcawl lcawl requested a review from Mpdreamz December 31, 2025 22:01
@lcawl lcawl merged commit 0645a4c into changelog-manifest Dec 31, 2025
25 of 26 checks passed
@lcawl lcawl deleted the render-folders branch December 31, 2025 22:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants