# StaticBlog v0.2.0 - Table of Contents

A reusable static blog engine for Elixir. Generates a complete website from markdown with syntax highlighting, RSS, sitemap, SEO structured data, MarsEdit integration via Micropub/XML-RPC, and Cloudflare R2 publishing.

## Pages

- [StaticBlog](readme.md)
- [LICENSE](license.md)
- [Changelog](changelog.md)

- Guides
  - [Footnotes](footnotes.md)
  - [MarsEdit Configuration](marsedit_configuration.md)
  - [Cloudflare R2 Setup](r2_setup.md)
  - [Workflow](workflow.md)

## Modules

- [StaticBlog.Markdown](StaticBlog.Markdown.md): Converts post markdown to HTML.

- Core
  - [StaticBlog](StaticBlog.md): A reusable static blog engine for Elixir.
  - [StaticBlog.Generator](StaticBlog.Generator.md): Static site generator. Walks the compiled list of posts and writes a
self-contained website into the output directory (defaults to `_site/`).
  - [StaticBlog.Post](StaticBlog.Post.md): A blog post parsed by `NimblePublisher` from a markdown file in `priv/posts/`.
  - [StaticBlog.RuntimePosts](StaticBlog.RuntimePosts.md): Reads blog posts from disk at runtime.

- Templates
  - [StaticBlog.Template](StaticBlog.Template.md): Behaviour that defines the five rendering callbacks a blog template must
implement: index, post, category, colophon, and not_found.
  - [StaticBlog.Template.Components](StaticBlog.Template.Components.md): Shared `Phoenix.Component` templates: the site layout, masthead, footer, and
theme toggle used by the default template implementation.
  - [StaticBlog.Template.Default](StaticBlog.Template.Default.md): Default template implementation inspired by Daring Fireball.

- Web &amp; Editing
  - [StaticBlog.Micropub](StaticBlog.Micropub.md): Business logic for the Micropub endpoint.
  - [StaticBlog.Web.Auth](StaticBlog.Web.Auth.md): Plug that enforces bearer-token authentication on Micropub requests.
  - [StaticBlog.Web.PreviewRouter](StaticBlog.Web.PreviewRouter.md): A minimal Plug router that serves the built `_site/` directory as a
static-file preview. Handles trailing-slash to `index.html` rewriting
so clean URLs work the same as they will on Cloudflare R2.
  - [StaticBlog.Web.Router](StaticBlog.Web.Router.md): HTTP router for the Micropub editing server.
  - [StaticBlog.Web.Server](StaticBlog.Web.Server.md): Builds supervisor child specs for the two Bandit servers that
`mix blog.server` starts
  - [StaticBlog.Web.XmlRpc](StaticBlog.Web.XmlRpc.md): XML-RPC shim that lets MarsEdit list and fetch posts from this blog.

- Content Feeds
  - [StaticBlog.Rss](StaticBlog.Rss.md): Builds an RSS 2.0 feed document from the blog's posts.
  - [StaticBlog.SEO](StaticBlog.SEO.md): Builds [JSON-LD](https://json-ld.org/) structured-data payloads for each
page type.
  - [StaticBlog.Sitemap](StaticBlog.Sitemap.md): Generates a `sitemap.xml` document listing every public URL on the blog.

- Publishing
  - [StaticBlog.Publisher](StaticBlog.Publisher.md): Publishes the built static site to a Cloudflare R2 bucket.

## Mix Tasks

- [mix blog.build](Mix.Tasks.Blog.Build.md): Builds the blog's static HTML files into the output directory.
- [mix blog.publish](Mix.Tasks.Blog.Publish.md): Builds the blog and syncs the output directory to the configured R2 bucket.
- [mix blog.serve](Mix.Tasks.Blog.Serve.md): Starts a tiny local HTTP server on the built blog directory for previewing
before publishing. Uses Erlang's built-in `:inets` httpd.
- [mix blog.server](Mix.Tasks.Blog.Server.md): Starts two Bandit servers from a single supervisor

