We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents fa30b00 + 0aa7c16 commit 73a3fcaCopy full SHA for 73a3fca
layouts/shortcodes/api-reference.html
@@ -2,6 +2,8 @@
2
{{ $pageArg := .Get "page" }}
3
{{ $anchorArg := .Get "anchor" }}
4
{{ $textArg := .Get "text" }}
5
-{{ $page := site.GetPage "page" (printf "%s/%s" $base $pageArg) }}
+{{ $pagePath := path.Join $base $pageArg }}
6
+{{ $page := site.GetPage "page" $pagePath }}
7
+{{ with $page }}{{else}}{{ range where site.Home.AllTranslations "Language.Lang" "en" }}{{ $page = .Site.GetPage "page" $pagePath }}{{ end }}{{ end }}
8
{{ $metadata := $page.Params.api_metadata }}
9
<a href="{{ $page.RelPermalink }}{{if $anchorArg}}#{{ $anchorArg }}{{end}}">{{if $textArg}}{{ $textArg }}{{else if $anchorArg}}{{ $anchorArg }}{{else}}{{ $metadata.kind }}{{end}}</a>
0 commit comments