From 2b554a70f28923fe427ade8ef87d7418c7ef0784 Mon Sep 17 00:00:00 2001 From: Robert Fekete Date: Thu, 26 May 2022 13:35:33 +0200 Subject: [PATCH 1/3] Allow versioned docs to point to the same page in the different versions If the version_menu_pagelinks config option is true, then link in the drop-down menu of the versioned docs points to the current page in the other version, instead of the main page. This can be useful if the document doesn't change much between the different versions. Note that if the current page doesn't exist in the other version, the link will be broken. --- layouts/partials/navbar-version-selector.html | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/layouts/partials/navbar-version-selector.html b/layouts/partials/navbar-version-selector.html index 6ac1ef63eb..80229cdb17 100644 --- a/layouts/partials/navbar-version-selector.html +++ b/layouts/partials/navbar-version-selector.html @@ -2,7 +2,11 @@ {{ .Site.Params.version_menu }} From a4e294c1b559e9409f904225fec6241e75de5e42 Mon Sep 17 00:00:00 2001 From: Robert Fekete Date: Thu, 26 May 2022 13:40:59 +0200 Subject: [PATCH 2/3] Adds version_menu_pagelinks to the userguide --- userguide/content/en/docs/Adding content/versioning.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/userguide/content/en/docs/Adding content/versioning.md b/userguide/content/en/docs/Adding content/versioning.md index 0128899237..fbeeb87457 100644 --- a/userguide/content/en/docs/Adding content/versioning.md +++ b/userguide/content/en/docs/Adding content/versioning.md @@ -42,6 +42,11 @@ title, change the `version_menu` parameter in `config.toml`: version_menu = "Releases" ``` +If you set the `version_menu_pagelinks` parameter to `true`, then links in the version drop-dow menu +point to the current page in the other version, instead of the main page. +This can be useful if the document doesn't change much between the different versions. +Note that if the current page doesn't exist in the other version, the link will be broken. + You can read more about Docsy menus in the guide to [navigation and search](/docs/adding-content/navigation/). From 06a398afdc6124d4a428ec185cbffd609d397c15 Mon Sep 17 00:00:00 2001 From: Robert Fekete Date: Wed, 15 Jun 2022 15:15:50 +0200 Subject: [PATCH 3/3] Typo fix --- userguide/content/en/docs/Adding content/versioning.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/userguide/content/en/docs/Adding content/versioning.md b/userguide/content/en/docs/Adding content/versioning.md index fbeeb87457..b8ebfc5c13 100644 --- a/userguide/content/en/docs/Adding content/versioning.md +++ b/userguide/content/en/docs/Adding content/versioning.md @@ -42,7 +42,7 @@ title, change the `version_menu` parameter in `config.toml`: version_menu = "Releases" ``` -If you set the `version_menu_pagelinks` parameter to `true`, then links in the version drop-dow menu +If you set the `version_menu_pagelinks` parameter to `true`, then links in the version drop-down menu point to the current page in the other version, instead of the main page. This can be useful if the document doesn't change much between the different versions. Note that if the current page doesn't exist in the other version, the link will be broken.