static site generator powered by Podlite markup
Built with it: podlite.org, which is this project's own site, axona.app, and the Raku knowledge base, which publishes 2274 documents.
Run it from the directory holding your index.podlite:
docker run -it --rm -v ${PWD}:/app/pub -p 3000:3000 \
podlite/podlite-web dev ./pub --preset everythingOpen http://localhost:3000.
Both the content path and --preset are required. See Presets. The index is looked up as index.podlite, then index.pod6; documents may carry either extension.
Content is processed once, when the server starts. Editing a document means restarting the container; the dev server watches the code, not the content.
A site can be one file:
=begin pod
= :puburl<https://example.com>
=TITLE My site
=head1 Hello
Written in Podlite, published as HTML.
=end pod
docker run --rm -v ${PWD}:/app/pub podlite/podlite-web \
export-zip ./pub -s 'https://example.com' --preset everything > site.zipexport-tgz writes a gzipped tarball instead; export leaves the site in /app/out.
A preset decides which documents become pages.
everythingβ every document is published. Use it while writing, and for sites that are not a blog.pubdateβ only documents carrying a publication date, and only once that date has passed. This is what a blog wants.
There is no default: a run without --preset stops with --preset undefined not valide.
# minimal site
yarn dev examples/01-minimal --preset everything
# multi-page with links
yarn dev examples/02-pages --preset everything
# blog with notes and React components
yarn dev examples/03-blog --preset pubdate- custom domain:
-s https://example.com, orSITE_URLin the environment; the flag wins - timezone:
TZ=Europe/London - index file other than the one found by default:
-i path/to/index.podlite - file mask:
-g '**/*.{podlite,pod6}'
cd examples/01-minimal
docker run --rm -v ${PWD}:/app/pub \
-e 'TZ=Europe/London' \
-e 'SITE_URL=https://example.com' \
podlite/podlite-web export-zip ./pub --preset everything > site.zipA site can draw its own page, and keep its React components next to the content without a package of its own.
Declare the template on the root block of index.podlite:
=begin pod
= :templateFile<src/template.podlite>
=end pod
The template renders the whole page, so anything it declares sits above the title. It reaches the page body through the shared component:
=useReact {DefaultTemplateComponent} from '@Components/service'
Components of your own live beside the content and are imported by path:
=useReact SiteNav from './components/sitenav'
The import map is keyed by path, so declare each component once: the same name reached through two paths collides. A path is resolved when it starts with ./ or /.
A theme bundles header-image styling and layout defaults. Select one with the :theme<> attribute on =begin pod:
=begin pod
= :theme<portrait-avatar>
= :puburl<https://example.com>
=TITLE My Blog
=end pod
The themes live in src/styles/themes/:
- portrait-avatar β round, grayscale header image; for sites with an author photo
- product β for emblem or logo headers; sets
#header img { max-width: 51% } - docs β placeholder for documentation sites
- minimal β no overrides; the default look
Theme styles load first, then :globalStyles<> (if set) overrides them.
@import "@Styles/themes/<name>.css" from page.styles.css keeps working; :theme<> is the same effect declared on the pod.
# install dependencies
yarn
# run dev server against a content directory
yarn dev examples/01-minimal --preset everything
# export to zip
yarn export-zip examples/01-minimal -s 'https://example.com' --preset everything > file.zipA local run attaches the content directory: it adds the directory to workspaces in package.json and writes an alias into next.config.js. Restore both when you are done:
yarn detach_path- turns a folder of Podlite and Markdown documents into a static site
- gives each page a fixed address from
:puburl, or one built from its publication date - holds a post back until its publication date has passed, under the
pubdatepreset - writes
sitemap.xml,rss.xmlandrobots.txt, and builds a search index - embeds the Podlite editor in a page, with the preview beside it
- renders
=Mermaiddiagrams,=pictureimages and video,=toccontents,=markdownblocks - takes a page template and React components kept next to the content, with no package of their own
The demo site: a post with its table of contents, and the editor embedded in a page.
Copyright (c) 2022β2026 Alexandr Zahatski
Released under a MIT License.

