Skip to content

Commit 3339e2c

Browse files
cursoragentovflowd
andcommitted
fix(web): preserve {version} in pageURL by excluding SemVer from populate()\n\nAvoid passing config.version (SemVer) to populate(config.pageURL, ...) so the {version} placeholder remains for buildVersionEntries to substitute per-version labels. This restores correct version selector URLs.
Co-authored-by: Claudio Wunder <cwunder@gnome.org>
1 parent 7d0ff0e commit 3339e2c

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

src/generators/web/utils/config.mjs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,11 @@ export default function createConfigSource(input) {
7676

7777
const version = `v${configVersion.version}`;
7878
const editURL = populate(config.editURL, { ...config, version });
79-
const pageURL = populate(config.pageURL, config);
79+
// Preserve the `{version}` placeholder in `pageURL` for buildVersionEntries.
80+
// Avoid passing the SemVer object so populate() does not replace `{version}` prematurely.
81+
const configWithoutVersion = { ...config };
82+
delete configWithoutVersion.version;
83+
const pageURL = populate(config.pageURL, configWithoutVersion);
8084

8185
const exports = {
8286
...Object.fromEntries(

0 commit comments

Comments
 (0)