I have an event calendar as a website, and it does not make sense to separately track the time from the event from the time of publishing, but it is useful to have that timestamp for atom feeds, ical, etc.
However, setting this value causes pages which are not committed to silently not render, which makes adding new events and confirming they show up correctly frustrating. There should be an error if a page that exists will not render at all.
{{ define "main" }}
<ol class="event-list">
{{- range sort .Pages "Params.Start" "desc" }}
<li class="event">
{{ partial "event" . }}
</li>
{{- end }}
</ol>
{{ end }}
Here is the patch adding the new file:
diff --git a/content/events/test.md b/content/events/test.md
new file mode 100644
index 0000000..7e2c974
--- /dev/null
+++ b/content/events/test.md
@@ -0,0 +1,8 @@
++++
+title = "Uncommitted test event"
+start = 2026-03-02T00:00:00
+end = 2026-03-02T01:00:00
+description = """
+This event does not make it to `.Pages`
+"""
++++
And the frontmatter
+++
title = "Uncommitted test event"
start = 2026-03-02T00:00:00
end = 2026-03-02T01:00:00
description = """
This event does not make it to `.Pages`
"""
+++
Using --buildFuture does seem to work cause errors to appear regarding missing dates when rendering partials since I removed the UTC timezone for the dates in the test example. It seems counter intuitive that this is required though when I haven’t specified a real date at all
content/example.md (not committed as you mentioned):
+++
title = "Uncommitted test event"
start = 2026-03-02T00:00:00
end = 2026-03-02T01:00:00
description = """
This event does not make it to `.Pages`
"""
+++
+++
title = "Uncommitted test event"
start = 2026-03-02T00:00:00
end = 2026-03-02T01:00:00
description = """
This event does not make it to `.Pages`
"""
+++
…the publishDate for the uncommitted file will be the start date, which is in the future.