mirror of
https://github.com/thegeeklab/hugo-geekdoc.git
synced 2024-11-22 12:50:40 +00:00
fix: fallback to 'content' if no contentDir parameter is set (#344)
This commit is contained in:
parent
c9f809ca19
commit
055ab6c4e3
@ -1,7 +1,7 @@
|
|||||||
{{ $geekdocRepo := default (default false .Site.Params.GeekdocRepo) .Page.Params.GeekdocRepo }}
|
{{ $geekdocRepo := default (default false .Site.Params.GeekdocRepo) .Page.Params.GeekdocRepo }}
|
||||||
{{ $geekdocEditPath := default (default false .Site.Params.GeekdocEditPath) .Page.Params.GeekdocEditPath }}
|
{{ $geekdocEditPath := default (default false .Site.Params.GeekdocEditPath) .Page.Params.GeekdocEditPath }}
|
||||||
{{ if .File }}
|
{{ if .File }}
|
||||||
{{ $.Scratch.Set "geekdocFilePath" (default (path.Join .Site.Params.contentDir .File.Path) .Page.Params.GeekdocFilePath) }}
|
{{ $.Scratch.Set "geekdocFilePath" (default (path.Join (default "content" .Site.Params.contentDir) .File.Path) .Page.Params.GeekdocFilePath) }}
|
||||||
{{ else }}
|
{{ else }}
|
||||||
{{ $.Scratch.Set "geekdocFilePath" false }}
|
{{ $.Scratch.Set "geekdocFilePath" false }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
Loading…
Reference in New Issue
Block a user