aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--config.json5
-rw-r--r--config.toml6
-rw-r--r--config.yaml4
-rw-r--r--themes/default/layouts/_default/home.authors.section.html11
-rw-r--r--themes/default/layouts/partials/author-card.html5
-rw-r--r--themes/default/layouts/partials/author-list.html18
-rw-r--r--themes/default/layouts/shortcodes/version.html2
7 files changed, 38 insertions, 13 deletions
diff --git a/config.json b/config.json
index 4fd39bd..369ea15 100644
--- a/config.json
+++ b/config.json
@@ -231,6 +231,10 @@
"baseName": "index",
"mediaType": "text/html"
},
+ "authors.section": {
+ "baseName": "authors",
+ "mediaType": "text/html"
+ },
"history": {
"path": "archives/messages",
"baseName": "index",
@@ -275,6 +279,7 @@
"xslt.sitemap",
"json",
"authors",
+ "authors.section",
"sources",
"browserconfig",
"history",
diff --git a/config.toml b/config.toml
index 8b90d6b..1e93e57 100644
--- a/config.toml
+++ b/config.toml
@@ -172,6 +172,10 @@ enableRobotsTXT = true
baseName = "index"
mediaType = "text/html"
+ [outputFormats."authors.section"]
+ baseName = "authors"
+ mediaType = "text/html"
+
[outputFormats.history]
path = "archives/messages"
baseName = "index"
@@ -208,7 +212,7 @@ enableRobotsTXT = true
mediaType = "text/html"
[outputs]
- home = ["html", "rss", "xslt.rss", "xslt.sitemap", "json", "authors", "sources", "browserconfig", "history", "records", "webmanifest"]
+ home = ["html", "rss", "xslt.rss", "xslt.sitemap", "json", "authors", "authors.section", "sources", "browserconfig", "history", "records", "webmanifest"]
section = ["html", "rss", "gallery", "following", "webring"]
taxonomy = ["html", "rss"]
term = ["html", "rss"]
diff --git a/config.yaml b/config.yaml
index 897f781..452f1d0 100644
--- a/config.yaml
+++ b/config.yaml
@@ -151,6 +151,9 @@ outputFormats:
path: authors
baseName: index
mediaType: text/html
+ authors.section:
+ baseName: authors
+ mediaType: text/html
history:
path: archives/messages
baseName: index
@@ -187,6 +190,7 @@ outputs:
- xslt.sitemap
- json
- authors
+ - authors.section
- sources
- browserconfig
- history
diff --git a/themes/default/layouts/_default/home.authors.section.html b/themes/default/layouts/_default/home.authors.section.html
new file mode 100644
index 0000000..8b868f9
--- /dev/null
+++ b/themes/default/layouts/_default/home.authors.section.html
@@ -0,0 +1,11 @@
+{{- $authors := partial "function-authors-slice.html" . -}}
+
+{{- range $author := first 3 (shuffle $authors) -}}
+{{- $data := index $.Site.Data $author | default "default" -}}
+{{- $date := (index (first 1 (where $.Site.Pages.ByDate.Reverse "Section" $author)) 0).Date -}}
+{{- partial "author-card.html" (dict
+ "Data" $data
+ "Date" $date
+ )
+-}}
+{{- end -}}
diff --git a/themes/default/layouts/partials/author-card.html b/themes/default/layouts/partials/author-card.html
index 243d360..6f771b7 100644
--- a/themes/default/layouts/partials/author-card.html
+++ b/themes/default/layouts/partials/author-card.html
@@ -22,7 +22,10 @@
{{- $height = $metadata.picture.profileHeight -}}
{{- end -}}
-{{- if not (fileExists (print "public/" $source)) -}}
+{{- if or
+ (not (path.Ext .Data.picture.profile))
+ (not (fileExists (print "public/" (partial "function-paths.html" "media") "/" .Data.user)))
+-}}
{{- $source = "/data/media/404.png" -}}
{{- $sourceset = "" -}}
{{- end -}}
diff --git a/themes/default/layouts/partials/author-list.html b/themes/default/layouts/partials/author-list.html
index bd87ad5..44b55aa 100644
--- a/themes/default/layouts/partials/author-list.html
+++ b/themes/default/layouts/partials/author-list.html
@@ -1,16 +1,14 @@
-{{- $authors := partial "function-authors-slice.html" . -}}
+{{- $authors := print "public/authors.html" -}}
<author-list>
<h1>Authors</h1>
<aside>
- {{- range $author := first 3 (shuffle $authors) -}}
- {{- $data := index $.Site.Data $author | default "default" -}}
- {{- $date := (index (first 1 (where $.Site.Pages.ByDate.Reverse "Section" $author)) 0).Date -}}
- {{- partial "author-card.html" (dict
- "Data" $data
- "Date" $date
- )
- -}}
- {{- end -}}
+ {{- with $authors = resources.Get $authors -}}
+ {{- $authors.Content | safeHTML -}}
+ {{- else -}}
+ <footer>
+ <code>No authors found!</code>
+ </footer>
+ {{- end -}}
</aside>
</author-list>
diff --git a/themes/default/layouts/shortcodes/version.html b/themes/default/layouts/shortcodes/version.html
index debd59a..f712c51 100644
--- a/themes/default/layouts/shortcodes/version.html
+++ b/themes/default/layouts/shortcodes/version.html
@@ -1,4 +1,4 @@
-{{- $version := "0.11.9" -}}
+{{- $version := "0.11.10" -}}
{{- $number := default false (.Get "number" | default (.Get 0)) -}}
{{- $clone := default false (.Get "clone" | default (.Get 1)) -}}
{{- $hugo := default false (.Get "hugo" | default (.Get 2)) -}}