API Reference Sayfa v#0.5.0

Copy Markdown View Source

Modules

Sayfa — a simple, extensible static site generator built in Elixir.

Behaviour for defining reusable template blocks.

Behaviour for defining content types.

Behaviour for defining build pipeline hooks.

Registry and lookup functions for blocks.

Analytics tracking block.

Back-link block with JSON-LD structured data.

Category cloud block.

Shared implementation for tag and category clouds.

Code copy button block.

Copy link button block.

Site footer block.

Site header block.

Shared helper functions for blocks.

Language switcher block.

Reading time block.

Dynamic recent content block.

Related content block.

Social links block.

Table of contents block.

Tag cloud block.

Orchestrates the full site build pipeline.

Result of a successful build.

Configuration handling for Sayfa sites.

Content struct and parsing functions.

Intermediate representation of parsed content before Markdown rendering.

Registry and lookup functions for content types.

Content type for articles.

Base macro for content types.

Content type for short notes.

Content type for standalone pages.

Content type for project showcases.

Content type for conference talks and presentations.

Locale-aware date formatting.

HTTP server plug for the Sayfa dev server.

GenServer that manages debounced site rebuilds.

Supervisor for the Sayfa dev server components.

GenServer that watches the filesystem for content changes.

Excerpt generation from content body.

Generates Atom feeds from content.

After-render hook that rewrites <img> tags to <picture> elements.

Multilingual support using subdirectory-based language detection.

Image helper functions for templates.

Wrapper around MDEx for rendering Markdown to HTML.

Pagination for content lists.

A single page of paginated results.

Calculates estimated reading time from HTML content.

Generates SEO meta tags for HTML pages.

Generates XML sitemaps for search engine discovery.

Extracts table of contents from rendered HTML.

TailwindCSS integration for compiling theme styles.

EEx template rendering with three-layer composition.

Theme loading and layout resolution with inheritance.

Validates content front matter fields during build.

Mix Tasks

Builds the static site from content files.

Removes the build output directory.

Generates a custom block module scaffold.

Generates a new content file with front matter scaffolding.

Generates a custom content type module scaffold.

Scaffolds an image optimization pipeline into your project.

Adds a new language to an existing Sayfa site.

Copies a default layout to your project for customization.

Generates a new Sayfa site project.

Starts a development server with live reload.

Upgrade your Sayfa site by syncing new theme files from the package.