Browse Source

fix(layout/default): workaround hugo bug on eval len(nil) go tmpl

closes #135
Josh Habdas 8 months ago
parent
commit
d8bdcfc9f9
Signed by: Josh Habdas <jhabdas@protonmail.com> GPG Key ID: B148B31154C75A74
3 changed files with 6 additions and 9 deletions
  1. 0
    3
      docs/layouts/feature/list.html
  2. 1
    1
      docs/layouts/index.html
  3. 5
    5
      layouts/_default/rss.xml

+ 0
- 3
docs/layouts/feature/list.html View File

@@ -22,9 +22,6 @@
22 22
       margin-inline-start: unset;
23 23
       margin-bottom: 2rem;
24 24
     }
25
-    nav {
26
-      margin-bottom: 20px;
27
-    }
28 25
     .hack article:first-of-type h2 {
29 26
       margin-top: 30px;
30 27
     }

+ 1
- 1
docs/layouts/index.html View File

@@ -9,7 +9,7 @@
9 9
       --logo-animation-filter-start: drop-shadow(0 -25px 45px #ff2e88) brightness(1) drop-shadow(0 -55px 35px #ff2e88) brightness(1) drop-shadow(0 -35px 155px #ff9800) brightness(4);
10 10
       --logo-animation-filter-end: drop-shadow(0 -20px 45px #ff2e88) brightness(.1) drop-shadow(0 0 5px #ff2e88) brightness(.7) drop-shadow(0 -20px 135px #ff2e88) brightness(2);
11 11
     }
12
-    main, footer, header {
12
+    main, footer, header, caption {
13 13
       text-align: center;
14 14
     }
15 15
     nav[itemtype*="SiteNavigationElement"] {

+ 5
- 5
layouts/_default/rss.xml View File

@@ -1,14 +1,14 @@
1 1
 <rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/">
2 2
   <channel>
3 3
     <docs>https://blogs.law.harvard.edu/tech/rss</docs>
4
-    <title>{{ if eq  .Title  .Site.Title }}{{ .Site.Title }}{{ else }}{{ with .Title }}{{ . }} on {{ end }}{{ .Site.Title }}{{ end }}</title>
4
+    <title>{{ if eq .Title .Site.Title }}{{ .Site.Title }}{{ else }}{{ with .Title }}{{ . }} on {{ end }}{{ .Site.Title }}{{ end }}</title>
5 5
     <link>{{ .Permalink }}</link>
6
-    <description>Recent content {{ if ne  .Title  .Site.Title }}{{ with .Title }}in {{ . }} {{ end }}{{ end }}on {{ .Site.Title }}</description>{{ if ge (len .Site.Params.images) 1 }}
6
+    <description>Recent content {{ if ne .Title .Site.Title }}{{ with .Title }}in {{ . }} {{ end }}{{ end }}on {{ .Site.Title }}</description>{{ if .Site.Params.images }}{{ if ge (len .Site.Params.images) 1 }}
7 7
     <image>
8
-      <title>{{ if eq  .Title  .Site.Title }}{{ .Site.Title }}{{ else }}{{ with .Title }}{{ . }} on {{ end }}{{ .Site.Title }}{{ end }}</title>
8
+      <title>{{ if eq .Title .Site.Title }}{{ .Site.Title }}{{ else }}{{ with .Title }}{{ . }} on {{ end }}{{ .Site.Title }}{{ end }}</title>
9 9
       <link>{{ .Permalink }}</link>
10 10
       <url>{{ index .Site.Params.images 0 }}</url>
11
-    </image>{{ end }}
11
+    </image>{{ end }}{{ end }}
12 12
     <ttl>1440</ttl>
13 13
     <generator>{{ with .Site.Data.npm.latest }}{{ .name | humanize | title }} {{ .version }} (Hugo {{ $.Hugo.Version }}){{ else }}Hugo {{ .Hugo.Version }}{{ end }}</generator>{{ with .Site.LanguageCode }}
14 14
     <language>{{ . }}</language>{{ end }}{{ with .Site.Author }}
@@ -29,7 +29,7 @@
29 29
         <description>{{ .Summary | plainify }}</description>{{ range .Params.categories }}
30 30
         <category domain="{{ printf "%s%s" ("/categories/" | absURL) (. | urlize ) }}">{{ . | title }}</category>{{ end }}{{ with .Resources.GetMatch "enclosure" }}{{ if .Params.length }}
31 31
         <enclosure url="{{ .Permalink }}" length="{{ .Params.length }}" type="{{ .MediaType }}" />{{ end }}{{ end }}
32
-        <content:encoded>{{ "<![CDATA[" | safeHTML }}{{ .Content | plainify }}{{ `]]>` | safeHTML }}</content:encoded>
32
+        <content:encoded>{{ "<![CDATA[" | safeHTML }}{{ .Content | plainify }}{{ "]]>" | safeHTML }}</content:encoded>
33 33
       </item>
34 34
     {{ end }}
35 35
   </channel>

Loading…
Cancel
Save