aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortdro <tdro@noreply.example.com>2025-01-16 00:00:00 +0000
committertdro <tdro@noreply.example.com>2025-01-16 00:00:00 +0000
commitd7bea7cad51cdb5574541ff87c47d7e7dad98cc4 (patch)
tree873be178572f6f7c16ec12a12ac98a3ba5e0dfee
parent0e52c30f3fda7a4b0e76be161b8b81ec021e8a24 (diff)
downloadcanory-d7bea7cad51cdb5574541ff87c47d7e7dad98cc4.tar.gz
canory-d7bea7cad51cdb5574541ff87c47d7e7dad98cc4.tar.bz2
canory-d7bea7cad51cdb5574541ff87c47d7e7dad98cc4.zip
themes/default/layouts/partials/function-page-modified: Use explicit file paths
-rw-r--r--themes/default/layouts/partials/function-page-modified.html13
1 files changed, 7 insertions, 6 deletions
diff --git a/themes/default/layouts/partials/function-page-modified.html b/themes/default/layouts/partials/function-page-modified.html
index d982507..467829d 100644
--- a/themes/default/layouts/partials/function-page-modified.html
+++ b/themes/default/layouts/partials/function-page-modified.html
@@ -1,3 +1,4 @@
+{{- $file := "/:" -}}
{{- $pageContext := .Context -}}
{{- $disable := or .Disable false -}}
{{- $format := or .Format "index.html" -}}
@@ -8,10 +9,14 @@
) $format
-}}
+{{- with $pageContext.Page.File -}}
+ {{- $file = print $pageContext.Page.File.Dir $pageContext.Page.File.BaseFileName "." $pageContext.Page.File.Ext -}}
+{{- end -}}
+
{{- $pageModTime := "" -}}
{{- $markdownModTime := "" -}}
-{{- $markdownContent := print "content/" $pageContext.File -}}
-{{- $markdownPublic := print "public/data/generates/content/" $pageContext.File -}}
+{{- $markdownContent := print "content/" $file -}}
+{{- $markdownPublic := print "public/data/generates/content/" $file -}}
{{- with fileExists $markdownContent -}}
{{- $markdownModTime = (os.Stat $markdownContent).ModTime -}}
@@ -27,10 +32,6 @@
{{- $page = gt $markdownModTime $pageModTime -}}
-{{- with not (resources.Get $page) -}}
- {{- $page = true -}}
-{{- end -}}
-
{{- $modified := or $page (in (slice
"home"
"section"