mirror of
https://github.com/adityatelange/hugo-PaperMod.git
synced 2026-05-21 11:05:49 +00:00
Implement new template system added with Hugo v0.146.0 (#1858)
* feat(layouts): move all files in layouts/_default up to the layouts/ root. * feat(layouts): rename layouts/partials folder to layouts/_partials * feat(layouts): rename layouts/shortcodes folder to layouts/_shortcodes * feat(taxonomy): add new taxonomy layout template A template named taxonomy.html used to be a candidate for both Page kind term and taxonomy, now it’s only considered for taxonomy.
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
{{- if lt hugo.Version "0.146.0" }}
|
||||
{{- errorf "=> hugo v0.146.0 or greater is required for hugo-PaperMod to build " }}
|
||||
{{- end -}}
|
||||
|
||||
<!DOCTYPE html>
|
||||
{{- $theme := site.Params.defaultTheme | default "auto" }}
|
||||
{{- if eq $theme "dark" }}
|
||||
<html lang="{{ site.Language }}" dir="{{ .Language.LanguageDirection | default "auto" }}" data-theme="dark">
|
||||
{{- else if eq $theme "light" }}
|
||||
<html lang="{{ site.Language }}" dir="{{ .Language.LanguageDirection | default "auto" }}" data-theme="light">
|
||||
{{- else }}
|
||||
<html lang="{{ site.Language }}" dir="{{ .Language.LanguageDirection | default "auto" }}" data-theme="auto">
|
||||
{{- end }}
|
||||
|
||||
<head>
|
||||
{{- partial "head.html" . }}
|
||||
</head>
|
||||
|
||||
{{- if (or (ne .Kind `page` ) (eq .Layout `archives`) (eq .Layout `search`)) }}
|
||||
<body class="list" id="top">
|
||||
{{- else }}
|
||||
<body id="top">
|
||||
{{- end }}
|
||||
{{ partialCached "header.html" . .Page -}}
|
||||
<main class="main">
|
||||
{{- block "main" . }}{{ end }}
|
||||
</main>
|
||||
{{ partialCached "footer.html" . .Layout .Kind (.Param "hideFooter") (.Param "ShowCodeCopyButtons") -}}
|
||||
</body>
|
||||
|
||||
</html>
|
||||
Reference in New Issue
Block a user