Browse Source

style(layouts): add file extensions for partials

because hugo 0.20+ no longer assumes you're only creating a website, neither will after dark. all
partials updated to specify html file extension if they're targeting inclusion of an html file.
Josh Habdas 2 years ago
parent
commit
34f14b53ee

+ 2
- 2
layouts/404.html View File

@@ -4,8 +4,8 @@
4 4
   <meta name="viewport" content="width=device-width, initial-scale=1.0">
5 5
   <meta name="robots" content="noindex">
6 6
   <title>404 Error | {{ .Site.Title }}</title>
7
-  {{ partial "favicon" . }}
8
-  {{ partial "meta/theme-color" . }}
7
+  {{ partial "favicon.html" . }}
8
+  {{ partial "meta/theme-color.html" . }}
9 9
   {{ template "_internal/google_analytics_async.html" . }}
10 10
   <style media="screen">
11 11
     @keyframes intro {

+ 5
- 5
layouts/_default/baseof.html View File

@@ -13,12 +13,12 @@
13 13
     {{ if or (in $noindex_kinds .Kind) ($is_noindex_true) }}
14 14
       <meta name="robots" content="noindex">
15 15
     {{ end }}
16
-    {{ partial "meta/name-author" . }}
16
+    {{ partial "meta/name-author.html" . }}
17 17
     {{ template "_internal/opengraph.html" . }}
18
-    {{ partial "meta/ogimage-maybe" . }}
19
-    {{ partial "meta/theme-color" . }}
18
+    {{ partial "meta/ogimage-maybe.html" . }}
19
+    {{ partial "meta/theme-color.html" . }}
20 20
     {{ if eq .Kind "home" }}
21
-      {{ partial "site-verification" . }}
21
+      {{ partial "site-verification.html" . }}
22 22
     {{ end }}
23 23
     {{ template "_internal/google_analytics_async.html" . }}
24 24
     {{ if .RSSLink }}
@@ -31,7 +31,7 @@
31 31
     {{ if (isset .Params "next") }}
32 32
       <link rel="next" href="{{ .Params.next }}">
33 33
     {{ end }}
34
-    {{ partial "favicon" . }}
34
+    {{ partial "favicon.html" . }}
35 35
     <style>
36 36
       {{ partial "critical-vendor.css" | safeCSS }}
37 37
       {{ partial "critical-theme.css" | safeCSS }}

+ 4
- 4
layouts/_default/list.html View File

@@ -1,15 +1,15 @@
1 1
 {{ define "header" }}
2
-  {{ partial "menu" . }}
2
+  {{ partial "menu.html" . }}
3 3
 {{ end }}
4 4
 {{ define "main" }}
5 5
   <header>
6 6
     <h1>{{ .Title }}</h1>
7 7
   </header>
8 8
   {{ range .Paginator.Pages }}
9
-    {{ partial "page-summary" . }}
9
+    {{ partial "page-summary.html" . }}
10 10
   {{ end }}
11 11
 {{ end }}
12 12
 {{ define "footer" }}
13
-  {{ partial "pagination" . }}
14
-  {{ partial "powered-by" . }}
13
+  {{ partial "pagination.html" . }}
14
+  {{ partial "powered-by.html" . }}
15 15
 {{ end }}

+ 2
- 2
layouts/_default/single.html View File

@@ -2,7 +2,7 @@
2 2
   {{ .Title }} | {{ .Site.Title }}
3 3
 {{- end }}
4 4
 {{ define "header" }}
5
-  {{ partial "menu" . }}
5
+  {{ partial "menu.html" . }}
6 6
 {{ end }}
7 7
 {{ define "main" }}
8 8
   <header>
@@ -11,5 +11,5 @@
11 11
   {{ .Content }}
12 12
 {{ end }}
13 13
 {{ define "footer" }}
14
-  {{ partial "powered-by" . }}
14
+  {{ partial "powered-by.html" . }}
15 15
 {{ end }}

+ 4
- 4
layouts/_default/taxonomy.html View File

@@ -1,15 +1,15 @@
1 1
 {{ define "header" }}
2
-  {{ partial "menu" . }}
2
+  {{ partial "menu.html" . }}
3 3
 {{ end }}
4 4
 {{ define "main" }}
5 5
   <header>
6 6
     <h1>{{ .Title }}</h1>
7 7
   </header>
8 8
   {{ range .Paginator.Pages }}
9
-    {{ partial "page-summary" . }}
9
+    {{ partial "page-summary.html" . }}
10 10
   {{ end }}
11 11
 {{ end }}
12 12
 {{ define "footer" }}
13
-  {{ partial "pagination" . }}
14
-  {{ partial "powered-by" . }}
13
+  {{ partial "pagination.html" . }}
14
+  {{ partial "powered-by.html" . }}
15 15
 {{ end }}

+ 2
- 2
layouts/_default/terms.html View File

@@ -1,5 +1,5 @@
1 1
 {{ define "header" }}
2
-  {{ partial "menu" . }}
2
+  {{ partial "menu.html" . }}
3 3
 {{ end }}
4 4
 {{ define "main" }}
5 5
   <header>
@@ -12,5 +12,5 @@
12 12
   </ul>
13 13
 {{ end }}
14 14
 {{ define "footer" }}
15
-  {{ partial "powered-by" . }}
15
+  {{ partial "powered-by.html" . }}
16 16
 {{ end }}

+ 4
- 4
layouts/index.html View File

@@ -2,17 +2,17 @@
2 2
   {{ .Site.Title }}
3 3
 {{- end }}
4 4
 {{ define "header" }}
5
-  {{ partial "menu" . }}
5
+  {{ partial "menu.html" . }}
6 6
 {{ end }}
7 7
 {{ define "main" }}
8 8
   <header>
9 9
     <h1>{{ .Title }}</h1>
10 10
   </header>
11 11
   {{ range (.Paginate (where .Data.Pages "Type" "post")).Pages }}
12
-    {{ partial "page-summary" . }}
12
+    {{ partial "page-summary.html" . }}
13 13
   {{ end }}
14 14
 {{ end }}
15 15
 {{ define "footer" }}
16
-  {{ partial "pagination" . }}
17
-  {{ partial "powered-by" . }}
16
+  {{ partial "pagination.html" . }}
17
+  {{ partial "powered-by.html" . }}
18 18
 {{ end }}

+ 1
- 1
layouts/partials/page-summary.html View File

@@ -4,7 +4,7 @@
4 4
       <a href="{{ .RelPermalink }}">{{ .Title }}</a>
5 5
     </h2>
6 6
     {{ if eq .Type "post" }}
7
-      <p class="muted">{{ partial "post/meta" . }}</p>
7
+      <p class="muted">{{ partial "post/meta.html" . }}</p>
8 8
     {{ end }}
9 9
   </header>
10 10
   {{ if .Description }}

+ 2
- 2
layouts/partials/post/byline.html View File

@@ -11,10 +11,10 @@
11 11
     {{ dateFormat "2 Jan, 2006" (default .Date (.PublishDate)) }}
12 12
   </time>
13 13
   {{ with .Params.categories }}
14
-    in <span itemprop="articleSection">{{ delimit (apply (apply (sort .) "partial" "post/category-link" ".") "chomp" ".") ", " " and " }}</span>
14
+    in <span itemprop="articleSection">{{ delimit (apply (apply (sort .) "partial" "post/category-link.html" ".") "chomp" ".") ", " " and " }}</span>
15 15
   {{ end }}
16 16
   {{ with .Params.tags }}
17
-    and tagged {{ delimit (apply (apply (sort .) "partial" "post/tag-link" ".") "chomp" ".") ", " " and " }}
17
+    and tagged {{ delimit (apply (apply (sort .) "partial" "post/tag-link.html" ".") "chomp" ".") ", " " and " }}
18 18
   {{ end }}
19 19
   using <span itemprop="wordCount">{{ .WordCount }}</span> words.
20 20
 </p>

+ 8
- 6
layouts/post/single.html View File

@@ -1,17 +1,19 @@
1 1
 {{ define "header" }}
2
-  {{ partial "menu" . }}
2
+  {{ partial "menu.html" . }}
3 3
 {{ end }}
4 4
 {{ define "main" }}
5 5
   <article itemscope itemtype="http://schema.org/BlogPosting">
6 6
     {{ template "_internal/schema.html" . }}
7 7
     <header>
8 8
       <h1 itemprop="headline">{{ .Title }}</h1>
9
-      <p class="muted">{{ partial "post/meta" . }}</p>
9
+      <p class="muted">
10
+        {{ partial "post/meta.html" . }}
11
+      </p>
10 12
     </header>
11 13
     {{ if .Description }}
12 14
       <blockquote itemprop="description">{{ .Description }}</blockquote>
13 15
     {{ end }}
14
-    {{ partial "toc-maybe" . }}
16
+    {{ partial "toc-maybe.html" . }}
15 17
     <div itemprop="articleBody">
16 18
       {{ .Content }}
17 19
     </div>
@@ -22,11 +24,11 @@
22 24
     {{ end }}
23 25
     <footer>
24 26
       <hr>
25
-      {{ partial "post/byline" . }}
26
-      {{ partial "post/related-content" . }}
27
+      {{ partial "post/byline.html" . }}
28
+      {{ partial "post/related-content.html" . }}
27 29
     </footer>
28 30
   </article>
29 31
 {{ end }}
30 32
 {{ define "footer" }}
31
-  {{ partial "powered-by" . }}
33
+  {{ partial "powered-by.html" . }}
32 34
 {{ end }}

Loading…
Cancel
Save