From bc7b42e71811e1b3231c1386496efbdf8338e086 Mon Sep 17 00:00:00 2001 From: David Steele Date: Thu, 16 May 2019 07:35:45 -0400 Subject: [PATCH] Restore index menu url default lost in b85e51d6. The url for the menu item referring to the index (i.e. site root page) should use {[project-url-root]}. This allows the url to be set to different values depending on the location of the index. --- doc/lib/BackRestDoc/Html/DocHtmlPage.pm | 10 +++++++--- doc/xml/release.xml | 4 ++++ 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/doc/lib/BackRestDoc/Html/DocHtmlPage.pm b/doc/lib/BackRestDoc/Html/DocHtmlPage.pm index 39d7cbffc..a858da4a1 100644 --- a/doc/lib/BackRestDoc/Html/DocHtmlPage.pm +++ b/doc/lib/BackRestDoc/Html/DocHtmlPage.pm @@ -135,9 +135,13 @@ sub process { my $oRenderOut = $self->{oManifest}->renderOutGet(RENDER_TYPE_HTML, $strRenderOutKey); - $oMenuBody-> - addNew(HTML_DIV, 'menu')-> - addNew(HTML_A, 'menu-link', {strContent => $$oRenderOut{menu}, strRef => "${strRenderOutKey}.html"}); + if (defined($$oRenderOut{menu})) + { + $oMenuBody->addNew(HTML_DIV, 'menu')->addNew( + HTML_A, 'menu-link', + {strContent => $$oRenderOut{menu}, + strRef => $strRenderOutKey eq 'index' ? '{[project-url-root]}' : "${strRenderOutKey}.html"}); + } } } } diff --git a/doc/xml/release.xml b/doc/xml/release.xml index 4f6f1685d..28b8d5063 100644 --- a/doc/xml/release.xml +++ b/doc/xml/release.xml @@ -203,6 +203,10 @@

Add --out-preserve to preserve contents of output path.

+ + +

Restore index menu url default lost in b85e51d6.

+