aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortdro <tdro@noreply.example.com>2025-03-11 00:00:00 +0000
committertdro <tdro@noreply.example.com>2025-03-11 00:00:00 +0000
commite21497c2954ac01f76cb291329cf640c2aea863a (patch)
treeb7d968c3ab7b739120d7cc6f4f7d38f70e5ddb7d
parent314d29ad9431e65d9a7c2ee6e70fd84b1922268f (diff)
downloadcanory-e21497c2954ac01f76cb291329cf640c2aea863a.tar.gz
canory-e21497c2954ac01f76cb291329cf640c2aea863a.tar.bz2
canory-e21497c2954ac01f76cb291329cf640c2aea863a.zip
themes/default/layouts/partials/function-page-modified: By authors
-rw-r--r--config/_default/config.json10
-rw-r--r--config/_default/config.toml2
-rw-r--r--config/_default/config.yaml2
-rw-r--r--themes/default/layouts/partials/function-page-modified.html7
4 files changed, 21 insertions, 0 deletions
diff --git a/config/_default/config.json b/config/_default/config.json
index 348c53c..7300cff 100644
--- a/config/_default/config.json
+++ b/config/_default/config.json
@@ -166,6 +166,16 @@
"taxonomy",
"term"
],
+ "types": [
+ "page",
+ "term",
+ "tags"
+ ],
+ "authors": [
+ "canory",
+ "default",
+ "nobody"
+ ],
"labels": {
"page": [
"baseof.html"
diff --git a/config/_default/config.toml b/config/_default/config.toml
index f18d77b..523ddcf 100644
--- a/config/_default/config.toml
+++ b/config/_default/config.toml
@@ -101,6 +101,8 @@ enableRobotsTXT = true
[params.segments.render]
pagers = ["home", "section", "taxonomy", "term"]
kinds = ["page", "home", "section", "taxonomy", "term"]
+ types = ["page", "term", "tags"]
+ authors = ["canory", "default", "nobody"]
[params.segments.render.labels]
page = ["baseof.html"]
home = ["baseof.html"]
diff --git a/config/_default/config.yaml b/config/_default/config.yaml
index 15d5dc6..a233931 100644
--- a/config/_default/config.yaml
+++ b/config/_default/config.yaml
@@ -97,6 +97,8 @@ params:
render:
pagers: [home, section, taxonomy, term]
kinds: [page, home, section, taxonomy, term]
+ types: [page, term, tags]
+ authors: [canory, default, nobody]
labels:
page: [baseof.html]
home: [baseof.html]
diff --git a/themes/default/layouts/partials/function-page-modified.html b/themes/default/layouts/partials/function-page-modified.html
index 8b28843..5a48012 100644
--- a/themes/default/layouts/partials/function-page-modified.html
+++ b/themes/default/layouts/partials/function-page-modified.html
@@ -48,6 +48,13 @@
{{- end -}}
{{- if and
+ (and (isset $segments.render "authors") (isset $segments.render "types"))
+ (and (not (in $segments.render.authors $pageContext.Page.Type)) (not (in $segments.render.types $pageContext.Page.Type)))
+-}}
+ {{- $modified = false -}}
+{{- end -}}
+
+{{- if and
(isset $segments.render "pagers")
(not (in "page" $pageContext.Page.Kind))
(or