Add a more flexible filename identifier scheme that also allows setting roles and versions#14754
Conversation
43cf5a0 to
6773b52
Compare
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. |
There was a problem hiding this comment.
Pull request overview
Adds support for structured “prefix identifiers” inside Hugo’s existing ._..._. filename wrapper syntax, enabling filenames to encode language, role, version, and several layout-related selectors without dot-segmentation ambiguity.
Changes:
- Extend the path parser to recognize and apply
language_,version_,role_,outputformat_,kind_, andlayout_wrapper prefixes. - Expand sites-matrix selection to account for parsed versions/roles (and multiple prefixed languages).
- Add unit/integration tests plus fuzz corpus coverage for the new filename scheme.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
hugolib/sitesmatrix/vectorstores.go |
Adds builder helpers to include version/role indices when constructing vector stores. |
common/paths/pathparser.go |
Implements prefix-identifier parsing + wrapper-dot skipping; updates sites-matrix derivation to include versions/roles/multi-language. |
common/paths/pathparser_test.go |
Adds extensive unit tests + benchmarks + fuzzing harness for prefix identifiers (content and layout paths). |
common/paths/paths_integration_test.go |
Adds integration tests validating prefix-based language selection for content and layouts. |
common/paths/testdata/fuzz/FuzzParsePathContent/62fadd5d4f836c18 |
Adds a fuzz regression input for FuzzParsePathContent. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
e27cebc to
15bc58b
Compare
…ng roles and versions Fixes gohugoio#14750
15bc58b to
13479d7
Compare
Fixes #14750