Skip to content

refactor(hugo): move HugoPrettyPath out of manifest.Node into pkg/hugo and fix IndexFileNames trim - #498

Merged
VelmiraS merged 2 commits into
masterfrom
refactor/hugo-pretty-path
Sep 16, 2026
Merged

VelmiraS merged 2 commits into
masterfrom
refactor/hugo-pretty-path

Conversation

@VelmiraS

Copy link
Copy Markdown
Contributor

What this PR does / why we need it:
Extracts HugoPrettyPath from manifest.Node into a new pkg/hugo package as a free function, passing IndexFileNames as a parameter instead of hardcoding "README". This fixes pretty-path generation for lowercase readme.md and any custom --hugo-section-files values.

Which issue(s) this PR fixes:
Fixes #

Special notes for your reviewer:
Pure refactor — no behavior change for --hugo=false or standard README.md-only configs. The only observable difference is that readme.md (lowercase) and custom index file names now produce the correct directory-style pretty path instead of a named path.

Release note:

With --hugo=true, HugoPrettyPath now correctly trims all configured --hugo-section-files stems (e.g. readme.md) instead of only the hardcoded "README". No change for --hugo=false.

@VelmiraS
VelmiraS requested a review from klocke-io September 16, 2026 06:11
@VelmiraS VelmiraS self-assigned this Sep 16, 2026
@gardener-prow gardener-prow Bot added do-not-merge/needs-kind Indicates a PR lacks a `kind/foo` label and requires one. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Sep 16, 2026

@klocke-io klocke-io left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀

@gardener-prow gardener-prow Bot added the lgtm Indicates that a PR is ready to be merged. label Sep 16, 2026
@gardener-prow

gardener-prow Bot commented Sep 16, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: klocke-io

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@gardener-prow

gardener-prow Bot commented Sep 16, 2026

Copy link
Copy Markdown

LGTM label has been added.

DetailsGit tree hash: f7507167ebb8117d8f934205b994ac7a0ecd20a2

@gardener-prow gardener-prow Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Sep 16, 2026
@VelmiraS
VelmiraS merged commit ac77d36 into master Sep 16, 2026
52 of 55 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. do-not-merge/needs-kind Indicates a PR lacks a `kind/foo` label and requires one. lgtm Indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants