Gate blog listings/RSS on pubDate<=now (in addition to !draft) via a shared getPublishedPosts() helper, so a post set to draft:false with a future pubDate publishes itself once a build runs on that day. Dev shows everything for preview. Add .gitea/workflows/scheduled-deploy.yml: a daily cron that pings the Coolify deploy hook so the static site rebuilds and the date gate advances. No file mutation, no repo write access — needs a runner + COOLIFY_DEPLOY_HOOK secret. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
26 lines
802 B
Plaintext
26 lines
802 B
Plaintext
---
|
|
import BaseLayout from '../../layouts/BaseLayout.astro';
|
|
import FormattedDate from '../../components/FormattedDate.astro';
|
|
import { getPublishedPosts } from '../../utils/posts';
|
|
|
|
const posts = await getPublishedPosts();
|
|
---
|
|
|
|
<BaseLayout title="Blog" description="Writing and notes by Jean-Luc Makiola." width="narrow">
|
|
<h1 class="page-title">Blog</h1>
|
|
{posts.length === 0 && <p>No posts yet — check back soon.</p>}
|
|
<ul class="post-list">
|
|
{
|
|
posts.map((post) => (
|
|
<li>
|
|
<a class="post-card" href={`/blog/${post.id}/`}>
|
|
<h3>{post.data.title}</h3>
|
|
<FormattedDate date={post.data.pubDate} />
|
|
{post.data.description && <p class="excerpt">{post.data.description}</p>}
|
|
</a>
|
|
</li>
|
|
))
|
|
}
|
|
</ul>
|
|
</BaseLayout>
|