From 8355018dbd15f8e1de5922e1fa30275558ac8b74 Mon Sep 17 00:00:00 2001 From: Robert Fekete Date: Fri, 1 Jul 2022 00:18:14 +0200 Subject: [PATCH] Version pagelinks (#1054) * 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. * Adds version_menu_pagelinks to the userguide * Typo fix Co-authored-by: LisaFC --- layouts/partials/navbar-version-selector.html | 6 +++++- userguide/content/en/docs/Adding content/versioning.md | 5 +++++ 2 files changed, 10 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 }} diff --git a/userguide/content/en/docs/Adding content/versioning.md b/userguide/content/en/docs/Adding content/versioning.md index 69762131a6..0f1234c647 100644 --- a/userguide/content/en/docs/Adding content/versioning.md +++ b/userguide/content/en/docs/Adding content/versioning.md @@ -84,6 +84,11 @@ version_menu: 'Releases' {{< /tab >}} {{< /tabpane >}} +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. + You can read more about Docsy menus in the guide to [navigation and search](/docs/adding-content/navigation/).