File tree Expand file tree Collapse file tree 1 file changed +8
-7
lines changed
Expand file tree Collapse file tree 1 file changed +8
-7
lines changed Original file line number Diff line number Diff line change 5555{{- $l10n := index . "l10n" | default false }}
5656{{- $abs := index . "abs" | default false }}
5757
58- {{- with $file }}
59- {{- $file = printf "/%s" . }}
60- {{- end }}
61- {{- $l10nDir := cond $l10n (printf "/%s" $page.Language.Lang) "" }}
58+ {{- $l10nDir := cond $l10n $page.Language.Lang "" }}
6259
6360{{- $staticPath := false }}
6461
6764 {{- $pageBaseName := path.BaseName .RelPermalink }}
6865
6966 {{- if eq .Section "posts" }}
70- {{- $path = printf "%s/posts/%s%s%s%s"
71- $type
67+ {{- $dir := printf "%s%s"
7268 (cond .Draft "drafts/" (.Date.Format "2006-01-02-"))
7369 $pageBaseName
70+ }}
71+ {{- $path = path.Join
72+ $type
73+ "posts"
74+ $dir
7475 $l10nDir
7576 $file
7677 }}
8788 .Site.LanguagePrefix ""
8889 1
8990 }}
90- {{- $path = printf "%s%s/%s%s%s"
91+ {{- $path = path.Join
9192 $type
9293 $pageURLParent
9394 $pageBaseName
You can’t perform that action at this time.
0 commit comments