diff --git a/documentation/themes/beastie/layouts/articles/list.html b/documentation/themes/beastie/layouts/articles/list.html index 14120e6b903..5c3029352fd 100644 --- a/documentation/themes/beastie/layouts/articles/list.html +++ b/documentation/themes/beastie/layouts/articles/list.html @@ -47,9 +47,10 @@

{{ i18n "resources" }}

{{ $docType := index $pathSections 1 }} {{ $docName := index $pathSections 2 }} {{ $pdfFilename := printf "%s_%s.pdf" $docName $docLang }} + {{ $adocFileName := printf "%s.adoc" $.Page.File }} {{ $pdfUrl := printf "%s%s/%s/%s/%s" $.Site.Params.downloadBaseUrl $docLang $docType $docName $pdfFilename }}
  • {{ i18n "download-pdf" }}
  • - {{ $editUrl := printf "%s%s/%s" $.Site.Params.editBaseUrl $.Site.Home.Language .Page.File }} + {{ $editUrl := printf "%s%s/%s/%s/%s" $.Site.Params.editBaseUrl $docLang $docType $docName $adocFileName }}
  • {{ i18n "edit-page" }}
  • diff --git a/documentation/themes/beastie/layouts/books/list.html b/documentation/themes/beastie/layouts/books/list.html index 08672d3097d..e2712578f48 100644 --- a/documentation/themes/beastie/layouts/books/list.html +++ b/documentation/themes/beastie/layouts/books/list.html @@ -133,11 +133,19 @@

    {{ i18n "resources" }}

    {{ $docLang := $.Site.Home.Language.Lang }} {{ $docType := index $pathSections 1 }} {{ $docName := index $pathSections 2 }} + {{ $sectionName := index $pathSections 3 }} {{ $pdfFilename := printf "%s_%s.pdf" $docName $docLang }} + {{ $adocFileName := printf "%s.adoc" $.Page.File }} {{ $pdfUrl := printf "%s%s/%s/%s/%s" $.Site.Params.downloadBaseUrl $docLang $docType $docName $pdfFilename }}
  • {{ i18n "download-pdf" }}
  • - {{ $editUrl := printf "%s%s/%s" $.Site.Params.editBaseUrl $.Site.Home.Language .Page.File }} -
  • {{ i18n "edit-page" }}
  • + {{ if $sectionName }} + {{ $editUrl := printf "%s%s/%s/%s/%s/%s" $.Site.Params.editBaseUrl $docLang $docType $docName $sectionName $adocFileName }} +
  • {{ i18n "edit-page" }}
  • + {{ else }} + {{ $editUrl := printf "%s%s/%s/%s/%s" $.Site.Params.editBaseUrl $docLang $docType $docName $adocFileName }} +
  • {{ i18n "edit-page" }}
  • + {{ end }} + diff --git a/documentation/themes/beastie/layouts/books/single.html b/documentation/themes/beastie/layouts/books/single.html index 08672d3097d..5a29e3166c6 100644 --- a/documentation/themes/beastie/layouts/books/single.html +++ b/documentation/themes/beastie/layouts/books/single.html @@ -134,9 +134,10 @@

    {{ i18n "resources" }}

    {{ $docType := index $pathSections 1 }} {{ $docName := index $pathSections 2 }} {{ $pdfFilename := printf "%s_%s.pdf" $docName $docLang }} + {{ $adocFileName := printf "%s.adoc" $.Page.File }} {{ $pdfUrl := printf "%s%s/%s/%s/%s" $.Site.Params.downloadBaseUrl $docLang $docType $docName $pdfFilename }}
  • {{ i18n "download-pdf" }}
  • - {{ $editUrl := printf "%s%s/%s" $.Site.Params.editBaseUrl $.Site.Home.Language .Page.File }} + {{ $editUrl := printf "%s%s/%s/%s/%s" $.Site.Params.editBaseUrl $docLang $docType $docName $adocFileName }}
  • {{ i18n "edit-page" }}