Convert docdock theme from submodule to native files and fix Hugo compatibility
This commit is contained in:
15
themes/docdock/layouts/partials/header.html
Normal file
15
themes/docdock/layouts/partials/header.html
Normal file
@@ -0,0 +1,15 @@
|
||||
{{ $header := print "_header." .Lang }}
|
||||
{{ $found := false }}
|
||||
{{ range .Site.Pages }}
|
||||
{{ if and .File (eq .File.BaseFileName $header) }}
|
||||
{{ .Content }}
|
||||
{{ $found = true }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ if not $found }}
|
||||
{{ if .Site.GetPage "page" "_header.md" }}
|
||||
{{(.Site.GetPage "page" "_header.md").Content}}
|
||||
{{else}}
|
||||
<a class="baselink" href="{{.Site.BaseURL}}">{{.Site.Title}}</a>
|
||||
{{end}}
|
||||
{{end}}
|
||||
Reference in New Issue
Block a user