A blog and RSS feed

Build a host-only blog from shared Markdown fixtures. Bash and a compatible pond are required; there is no pond initialization, service, or credential. Legacy page layouts use matching local vendor assets from the binary package.

site:
  title: Fixture blog
  base_url: /sample-blog/
  site_url: https://example.invalid
strict: true
content:
  - name: posts
    pattern: /posts/*.md
routes:
  - name: home
    type: static
    slug: ""
    page: /index.md
    routes:
      - name: posts
        type: content
        slug: ""
        content: posts
feed:
  content: posts
  section: Blog
---
title: First post
layout: blog
section: Blog
date: "2024-01-15"
summary: The older visible article.
---

# First post

An article from January.
#!/bin/bash
set -euo pipefail
SOURCE_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
if [[ -n "${EXAMPLE_OUTPUT:-}" ]]; then
    mkdir "${EXAMPLE_OUTPUT}"
    WORK="$(cd "${EXAMPLE_OUTPUT}" && pwd)"
else
    WORK="$(mktemp -d "${TMPDIR:-/tmp}/watertown-blog.XXXXXX")"
fi
pond run -d "${SOURCE_DIR}" host+sitegen:///site.yaml -- build "${WORK}/site" --strict
echo "Example output: ${WORK}"

Run bash testsuite/examples/blog-rss/run.sh from a checkout or unpack the complete package. EXAMPLE_OUTPUT must be absent when specified; otherwise a fresh temporary directory is created.

Test 214 asserts two feed entries, newest-first order, absolute links under https://example.invalid/sample-blog/, and hidden/undated exclusions. The .invalid origin is a placeholder for generated links, never contacted. Hidden pages still render: hidden: true is not access control.

Set site.site_url to your real origin and site.base_url to the actual hosting prefix before publishing. Without a site URL no feed is generated. See frontmatter and feed configuration.