Add optional lang as argument to rel/relref

Fixes #4956
This commit is contained in:
Bjørn Erik Pedersen
2018-07-17 21:44:08 +02:00
parent 3eb313fef4
commit d741064beb
8 changed files with 165 additions and 80 deletions

View File

@@ -380,8 +380,8 @@ if (!doNotTrack) {
</style>
{{ end }}
{{ end }}`},
{`shortcodes/ref.html`, `{{ if len .Params | eq 2 }}{{ ref .Page (.Get 0) (.Get 1) }}{{ else }}{{ ref .Page (.Get 0) }}{{ end }}`},
{`shortcodes/relref.html`, `{{ if len .Params | eq 2 }}{{ relref .Page (.Get 0) (.Get 1) }}{{ else }}{{ relref .Page (.Get 0) }}{{ end }}`},
{`shortcodes/ref.html`, `{{ ref .Page .Params }}`},
{`shortcodes/relref.html`, `{{ relref .Page .Params }}`},
{`shortcodes/twitter.html`, `{{- $pc := .Page.Site.Config.Privacy.Twitter -}}
{{- if not $pc.Disable -}}
{{- if $pc.Simple -}}

View File

@@ -1 +1 @@
{{ if len .Params | eq 2 }}{{ ref .Page (.Get 0) (.Get 1) }}{{ else }}{{ ref .Page (.Get 0) }}{{ end }}
{{ ref .Page .Params }}

View File

@@ -1 +1 @@
{{ if len .Params | eq 2 }}{{ relref .Page (.Get 0) (.Get 1) }}{{ else }}{{ relref .Page (.Get 0) }}{{ end }}
{{ relref .Page .Params }}