Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Add a more flexible filename identifier scheme that also allows setting roles and versions#14754

Merged
bep merged 1 commit into
gohugoio:masterfrom
bep:feat/morefileidentifiers-14750
Apr 15, 2026
Merged

Add a more flexible filename identifier scheme that also allows setting roles and versions#14754
bep merged 1 commit into
gohugoio:masterfrom
bep:feat/morefileidentifiers-14750

Conversation

@bep
Copy link
Copy Markdown
Member

@bep bep commented Apr 14, 2026

Fixes #14750

@bep bep force-pushed the feat/morefileidentifiers-14750 branch 4 times, most recently from 43cf5a0 to 6773b52 Compare April 14, 2026 22:09
@bep bep marked this pull request as ready for review April 15, 2026 09:28
@gemini-code-assist
Copy link
Copy Markdown

Using Gemini Code Assist

The 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 /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description

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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.

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.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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_, and layout_ 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.

Comment thread common/paths/pathparser_test.go
Comment thread common/paths/pathparser_test.go Outdated
Comment thread common/paths/pathparser.go
Comment thread common/paths/pathparser.go
@bep bep force-pushed the feat/morefileidentifiers-14750 branch 2 times, most recently from e27cebc to 15bc58b Compare April 15, 2026 09:48
@bep bep force-pushed the feat/morefileidentifiers-14750 branch from 15bc58b to 13479d7 Compare April 15, 2026 13:02
@bep bep merged commit ce2a156 into gohugoio:master Apr 15, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add a more flexible filename identifier scheme that also allows setting roles and versions

2 participants