Use Hugo's relLangURL filter to fix relative URLs in list shortdocs
Submitted by: allanjude@ PR: 253013 Review: https://reviews.freebsd.org/D28344
This commit is contained in:
parent
42b64a1521
commit
4dba695e5d
2 changed files with 2 additions and 2 deletions
documentation/themes/beastie/layouts/shortcodes
|
@ -14,7 +14,7 @@
|
|||
{{ if in .path "_index.adoc" }}
|
||||
{{ $articlePath := replaceRE "/_index.adoc" "" .path }}
|
||||
{{ $articleName := replaceRE "articles/" "" $articlePath }}
|
||||
<li><a href="{{ $articlePath }}">{{ $articleName }}</a></li>
|
||||
<li><a href="{{ $articlePath | relLangURL }}">{{ $articleName }}</a></li>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</ul>
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
{{ if in .path "_index.adoc" }}
|
||||
{{ $bookPath := replaceRE "/_index.adoc" "" .path }}
|
||||
{{ $bookName := replaceRE "books/" "" $bookPath }}
|
||||
<li><a href="{{ $bookPath }}">{{ $bookName }}</a></li>
|
||||
<li><a href="{{ $bookPath | relLangURL }}">{{ $bookName }}</a></li>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</ul>
|
||||
|
|
Loading…
Reference in a new issue