Documentation
Static blogs
littleFedi can turn selected posts into an ordinary static site. The post stays on the fediverse, and the page can be read by anyone with a browser, no account needed.
Turning it on
Downloaded binaries already include blog support. If you build from the
source archive, make build-blog produces
littlefedi-blog:
make build-blog
Enable the generator in littlefedi.toml, editing the existing
[blog] section if there is one:
[blog]
enabled = true
output_dir = "blogs"
directory_enabled = true
slug_format = "{year}/{month}/{day}/{title}"
allow_user_slug_format = true
all_accounts = false
Allow an account to publish, then start the server with that executable:
./littlefedi-blog --config littlefedi.toml admin blog allow --username alice
./littlefedi-blog --config littlefedi.toml
With a downloaded binary renamed to littlefedi, use that name
in the commands instead. The examples below use littlefedi.
Generated blogs are listed at /blogs. Set
directory_enabled = false to remove that page; each author can also
opt out individually, which hides them from the list without changing their
blog's direct address. To keep the directory for signed-in accounts only,
set public_blog_directory = false under [web].
Individual blogs and their own sitemaps stay public.
Every generated blog publishes /@username/blog/sitemap.xml. When
the directory is on, /sitemap.xml indexes those per-blog maps and
/robots.txt advertises the index. Opted-out blogs are left out of
both.
Who may blog
Nobody, until an administrator says so, per account, with
admin blog allow or the button in the admin accounts page. A blog is public writing under the instance's name, so it is opt-in.
Set all_accounts = true to grant it to every local account instead.
While that is on, the per-account permission is ignored rather than merged, so
the admin button and admin blog allow refuse to run and say why.
Turning it back off returns the instance to whatever each account was
individually granted, because those grants were never overwritten.
Publishing a post
An allowed account gets a Blog post option in the composer. From the shell:
./littlefedi --config littlefedi.toml post --blog
./littlefedi --config littlefedi.toml post --blog --blog-slug my-permalink
./littlefedi --config littlefedi.toml admin blog rebuild --username alice
The post federates like any other. The static page is generated from it, so there is nothing to keep in sync.
Permalinks
A post's address comes from slug_format, rendered once when the post
is first published and then stored. Editing the post later never changes its URL.
| Placeholder | Expands to |
|---|---|
{year} {month} {day} | Publication date, as shown on the page |
{title} | The post's first line, lowercased and hyphenated |
{id} | The full status id |
{shortid} | The first 8 characters of the status id |
The template must contain {title}, {id} or
{shortid}, must not start or end with a slash, and must not begin
with a segment the generator owns: tags, archive,
media, feed.xml, style.css,
index.html. An invalid template is rejected at startup.
With allow_user_slug_format = true, the default, each author can
override the template for their own blog. Set it to false to impose
one style across the instance. Either way an author can type a custom URL for a
single post in the composer. Duplicate slugs get a -2,
-3 suffix.
Posts published before permalinks existed keep working: the old
/@username/blog/<status-id>/ address is regenerated as a
static redirect, and Atom entry ids stay pinned to the status id, so no feed
reader resurfaces an old post as new.
What a blog contains
Each blog lives at /@username/blog/ and holds:
- An index, and a permanent page for every selected post.
- Hashtag indexes and a chronological archive.
- An Atom feed at
feed.xml. - A small static theme with no application JavaScript and no database work on a page request.
- Self-contained copies of local attachments. S3 attachments keep their public object URLs.
What gets published
Only public, top-level, non-boost posts that were explicitly marked as blog posts become blog entries. Followers-only posts and direct messages cannot be published there.
If the author enables replies in Settings > Blog, a post page can also show replies known to the instance. Only replies with public visibility are included, together with their attachments. Unlisted replies are left out. Rebuild existing blogs after upgrading from a version that included those replies, so old generated pages are replaced too.
Appearance
Five themes ship: Marginalia for long reads, with each post's date and tags in a margin column; Ledger for technical notes, with monospace metadata on a strict grid and code that breaks out of the reading column; Kiosk for short posts and links, with a full-width colour band and tags as pills; Dusk, a dark-first journal with no rules and one amber mark per post; and Press, the reading half of the matching interface theme, with two inks and heavy titles.
All five work without JavaScript or images, in light and dark. Press serves its display font from the instance; the others use system fonts. Authors can paste or upload their own CSS on top, capped at 64 KB, and there is a Rebuild blog now button in the same place. See the theming guide.
Rebuilds
Rebuilds run through the durable job queue and replace the complete site only after rendering succeeds. A failed build leaves the previous site standing. Publishing a post rebuilds that post's page and leaves the stylesheet alone; changing your theme or CSS queues a full rebuild, but only if something changed. When discussion activity rebuilds a post, the notification links the rebuild to that post even if the activity did not mention you.
Blog output is a single-process feature. Leave it disabled in a multi-process deployment until shared publication and cross-process rebuild ownership exist.