Drop file extension from partial uses

master
Will Faught 3 years ago
parent 2ece967314
commit 887be3eb42

@ -2,22 +2,22 @@
{{ $rtl := eq .Language.LanguageDirection "rtl" }} {{ $rtl := eq .Language.LanguageDirection "rtl" }}
{{ $lang := .Site.LanguageCode | default .Site.Language.Lang }} {{ $lang := .Site.LanguageCode | default .Site.Language.Lang }}
<html{{ if $rtl }} dir="rtl"{{ end }}{{ with $lang }} lang="{{ . }}"{{ end }}> <html{{ if $rtl }} dir="rtl"{{ end }}{{ with $lang }} lang="{{ . }}"{{ end }}>
{{ partial "paige/head.html" . }} {{ partial "paige/head" . }}
<body class="d-flex flex-column"> <body class="d-flex flex-column">
<div class="container flex-fill"> <div class="container flex-fill">
<div class="row"> <div class="row">
<div class="col"> <div class="col">
{{ partial "paige/header.html" . }} {{ partial "paige/header" . }}
<main> <main>
{{ block "main" . }}{{ end }} {{ block "main" . }}{{ end }}
</main> </main>
{{ partial "paige/footer.html" . }} {{ partial "paige/footer" . }}
</div> </div>
</div> </div>
</div> </div>
{{ partial "paige/script.html" . }} {{ partial "paige/script" . }}
{{ if templates.Exists "partials/paige-body-last.html" }} {{ if templates.Exists "partials/paige-body-last.html" }}
{{ partial "paige/body-last.html" . }} {{ partial "paige/body-last" . }}
{{ end }} {{ end }}
</body> </body>
</html> </html>

@ -1,6 +1,6 @@
{{ define "main" }} {{ define "main" }}
<article> <article>
{{ partial "paige/metadata.html" . }} {{ partial "paige/metadata" . }}
<section> <section>
{{ with .Params.stretch }} {{ with .Params.stretch }}
<div class="mb-3 mw-100 rounded-4 shadow" style="background-image: url('{{ relLangURL . }}'); background-position: center; background-size: cover; height: 20rem"></div> <div class="mb-3 mw-100 rounded-4 shadow" style="background-image: url('{{ relLangURL . }}'); background-position: center; background-size: cover; height: 20rem"></div>
@ -23,8 +23,8 @@
</div> </div>
{{ end }} {{ end }}
</section> </section>
{{ partial "paige/toc.html" . }} {{ partial "paige/toc" . }}
{{ partial "paige/content.html" . }} {{ partial "paige/content" . }}
{{ partial "paige/social.html" . }} {{ partial "paige/social" . }}
</article> </article>
{{ end }} {{ end }}

@ -1,6 +1,6 @@
{{ define "main" }} {{ define "main" }}
{{ if not .Params.paige.show_full_pages }} {{ if not .Params.paige.show_full_pages }}
{{ partial "paige/article.html" . }} {{ partial "paige/article" . }}
{{ end }} {{ end }}
{{ partial "paige/pages.html" . }} {{ partial "paige/pages" . }}
{{ end }} {{ end }}

@ -1,4 +1,4 @@
{{ define "main" }} {{ define "main" }}
{{ partial "paige/article.html" . }} {{ partial "paige/article" . }}
{{ partial "paige/search.html" . }} {{ partial "paige/search" . }}
{{ end }} {{ end }}

@ -13,7 +13,7 @@
{{ $pages = $pages | first $limit }} {{ $pages = $pages | first $limit }}
{{ end }} {{ end }}
{{ $pages = where $pages "Params.paige.hide_rss" "ne" true }} {{ $pages = where $pages "Params.paige.hide_rss" "ne" true }}
{{ $title := partial "paige/func-title.html" . }} {{ $title := partial "paige/func-title" . }}
{{ printf "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>" | safeHTML }} {{ printf "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>" | safeHTML }}
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"> <rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel> <channel>
@ -42,7 +42,7 @@
{{ end }} {{ end }}
{{ range $pages }} {{ range $pages }}
<item> <item>
{{ with partial "paige/func-authors.html" . }} {{ with partial "paige/func-authors" . }}
<author>{{ . }}</author> <author>{{ . }}</author>
{{ end }} {{ end }}
{{ if .Content }} {{ if .Content }}

@ -1,4 +1,4 @@
{{ define "main" }} {{ define "main" }}
{{ partial "paige/article.html" . }} {{ partial "paige/article" . }}
{{ partial "paige/comments.html" . }} {{ partial "paige/comments" . }}
{{ end }} {{ end }}

@ -1,5 +1,5 @@
{{ define "main" }} {{ define "main" }}
{{ partial "paige/article.html" . }} {{ partial "paige/article" . }}
{{ if .Pages }} {{ if .Pages }}
<article> <article>
<ul class="list-inline text-center"> <ul class="list-inline text-center">

@ -1,4 +1,4 @@
{{ define "main" }} {{ define "main" }}
{{ partial "paige/article.html" . }} {{ partial "paige/article" . }}
{{ partial "paige/pages.html" . }} {{ partial "paige/pages" . }}
{{ end }} {{ end }}

@ -1,5 +1,5 @@
<article> <article>
{{ partial "paige/metadata.html" . }} {{ partial "paige/metadata" . }}
{{ partial "paige/toc.html" . }} {{ partial "paige/toc" . }}
{{ partial "paige/content.html" . }} {{ partial "paige/content" . }}
</article> </article>

@ -1,9 +1,9 @@
<head> <head>
{{ partial "paige/meta.html" . }} {{ partial "paige/meta" . }}
<title>{{ partial "paige/func-title.html" . }}</title> <title>{{ partial "paige/func-title" . }}</title>
{{ partial "paige/link.html" . }} {{ partial "paige/link" . }}
{{ partial "paige/style.html" . }} {{ partial "paige/style" . }}
{{ if templates.Exists "partials/paige-head-last.html" }} {{ if templates.Exists "partials/paige-head-last.html" }}
{{ partial "paige/head-last.html" . }} {{ partial "paige/head-last" . }}
{{ end }} {{ end }}
</head> </head>

@ -1,5 +1,5 @@
{{ if .Site.Menus.main }} {{ if .Site.Menus.main }}
<header> <header>
{{ partial "paige/menu.html" . }} {{ partial "paige/menu" . }}
</header> </header>
{{ end }} {{ end }}

@ -30,7 +30,7 @@
<link crossorigin="anonymous" href="https://cdn.jsdelivr.net/npm/katex@0.16.3/dist/katex.min.css" integrity="sha384-Juol1FqnotbkyZUT5Z7gUPjQ9gzlwCENvUZTpQBAPxtusdwFLRy382PSDx5UUJ4/" rel="stylesheet"> <link crossorigin="anonymous" href="https://cdn.jsdelivr.net/npm/katex@0.16.3/dist/katex.min.css" integrity="sha384-Juol1FqnotbkyZUT5Z7gUPjQ9gzlwCENvUZTpQBAPxtusdwFLRy382PSDx5UUJ4/" rel="stylesheet">
{{ end }} {{ end }}
{{ if .AlternativeOutputFormats }} {{ if .AlternativeOutputFormats }}
{{ $title := partial "paige/func-title.html" . }} {{ $title := partial "paige/func-title" . }}
{{ range .AlternativeOutputFormats }} {{ range .AlternativeOutputFormats }}
<link href="{{ .Permalink }}" rel="{{ .Rel }}" title="{{ $title }}" type="{{ .MediaType.Type }}"> <link href="{{ .Permalink }}" rel="{{ .Rel }}" title="{{ $title }}" type="{{ .MediaType.Type }}">
{{ end }} {{ end }}

@ -1,5 +1,5 @@
<meta charset="utf-8"> <meta charset="utf-8">
{{ with partial "paige/func-authors.html" . }} {{ with partial "paige/func-authors" . }}
<meta content="{{ . }}" name="author"> <meta content="{{ . }}" name="author">
{{ end }} {{ end }}
{{ with .Description }} {{ with .Description }}

@ -1,5 +1,5 @@
<section> <section>
{{ partial "paige/title.html" . }} {{ partial "paige/title" . }}
{{ partial "paige/description.html" . }} {{ partial "paige/description" . }}
{{ partial "paige/other.html" . }} {{ partial "paige/other" . }}
</section> </section>

@ -1,4 +1,4 @@
{{ $authors := partial "paige/func-authors.html" . }} {{ $authors := partial "paige/func-authors" . }}
{{ if or $authors .PublishDate}} {{ if or $authors .PublishDate}}
<p class="text-center text-muted"> <p class="text-center text-muted">
{{- with $authors }}{{ . }}{{ end -}} {{- with $authors }}{{ . }}{{ end -}}

@ -3,12 +3,12 @@
{{ $p := .Paginate .Pages }} {{ $p := .Paginate .Pages }}
{{ range $p.Pages }} {{ range $p.Pages }}
{{ .Scratch.Set "paige_show_full_pages" true }} {{ .Scratch.Set "paige_show_full_pages" true }}
{{ partial "paige/article.html" . }} {{ partial "paige/article" . }}
{{ end }} {{ end }}
{{ if or $p.HasPrev $p.HasNext }} {{ if or $p.HasPrev $p.HasNext }}
<section> <section>
<div class="d-flex justify-content-center"> <div class="d-flex justify-content-center">
{{ partial "paige/pagination.html" . }} {{ partial "paige/pagination" . }}
</div> </div>
</section> </section>
{{ end }} {{ end }}
@ -27,7 +27,7 @@
{{ if or $p.HasPrev $p.HasNext }} {{ if or $p.HasPrev $p.HasNext }}
<section> <section>
<div class="d-flex justify-content-center"> <div class="d-flex justify-content-center">
{{ partial "paige/pagination.html" . }} {{ partial "paige/pagination" . }}
</div> </div>
</section> </section>
{{ end }} {{ end }}

Loading…
Cancel
Save