- Rust 52%
- Python 34%
- JavaScript 10%
- Jinja-like 3%
- Shell <1%
- 3 more languages 0%
lichen.page #
lichen.page is a cms for static site generators built on atproto. you can see screenshots of it, read about its background, or try it out in one the following ways:
- use the hosted version — login with atproto
- run it locally — see the quickstart
- use the malleable software version
lichen.page is a piece of software fan-fiction (aka a fork) of lichen-markdown which was itself a fork of lichen-gemini, which is composed of a few forth scripts.
In the third edition, the CMS was rewritten in Rust to enable realtime collaboration using yrs and work with any static site generator.
This project is quite experimental, but you can also use it.
Quickstart #
git clone https://tangled.org/notplants.bsky.social/lichen.page.git
cd lichen.page
cargo run -- serve
# then visit http://localhost:9000/cms
The above runs lichen in the most minimal single-site mode, for additional features (like multi-site mode, P2P sync via iroh, and ATProto integration) see README-extended.md.
But if you are just trying it out locally, single-site mode is a good way to get a feeling.
Commands #
The default crate via cargo run is lichen-server, which can be used as follows in single-site mode:
Usage: cargo run -- <COMMAND>
Commands:
serve Runs the server for the site
init Initializes the site directory with starter content (no-op if already populated)
build Builds the site to its dist/ directory
export Exports the site to a zip file
user Manages users stored in users/ folder
help Print this message or the help of the given subcommand(s)
Options:
--site <PATH> Site directory (default: ./site)
--settings <FILE> Path to settings.toml file (default: <site>/settings.toml)
-h, --help Print help
Configuration #
lichen reads its runtime settings from layered sources:
- optional CLI args:
--site <path>establishes the project root (defaults to./site).--settings <path>sets the path to the settings file (defaults to<site_dir>/settings.toml). - optional environment variables prefixed with
LM_(includingLM_SITE_DIRandLM_SETTINGS_PATH, for exampleLM_AUTO_SAVE=true). - optional values in
settings.toml. - default values.
CLI args override environment variables which override file values which override the defaults. all CLI subcommands (serve, build, export, user) use the same configuration scheme.
the standard usage is: ./lichen serve --site path/to/your/site (with other configurations stored in path/to/your/site/settings.toml).
the built-in Axum server listens on port 9000 by default. you can override it by setting server_port in settings.toml or exporting LM_SERVER_PORT.
all possible configurations are shown in settings.toml.example along with explanations.
Authentication & User Management #
If use_auth is not explicitly set to true in configuration, authentication will not be required and anyone can access the CMS.
If use_auth is set to true, users must log in to access protected routes. Users are stored as individual TOML files in the users/ directory within your site folder:
site/
└── users/
├── alice.toml
└── bob.toml
Each user file contains an Argon2 password hash:
password_hash = "$argon2id$v=19$m=19456,t=2,p=1$..."
Use the built-in CLI commands to manage users (passwords are hashed automatically):
# create a new user (prompts for password)
cargo run -- user add yourusername
# update an existing user's password
cargo run -- user set-password yourusername
To start an authenticated session, visit /login/. After logging in, the browser receives a session cookie (managed by tower-sessions) which allows access to protected CMS routes.
Static Site Generators #
lichen uses a simple built-in static site generator by default, but it can also be configured to use other static site generators.
these are the possible values for the ssg setting in settings.toml. each also requires being enabled as a compilation feature.
lichen– the default, implements a markdown + Tera pipeline entirely inside this crate.hugo– enable thehugoCargo feature and install thehugoCLI somewhere on$PATH.mdbook– enable themdbookCargo feature. This routes all builds through themdbook_drivercrate so no external binary is required.
additional static site generators can be added by implementing the StaticSiteGenerator trait in ssg_trait.rs.
Multi-Site Mode #
lichen can also be run in multi-site mode, which allows hosting multiple sites from a single server instance with a management dashboard. Each site is served based on its domain name via the HTTP Host header.
cargo run -- --multi serve
For full documentation of multisite mode, see README-extended.md.
Agent Entrypoint #
For the malleable software version, paste this prompt into your AI agent of choice:
Please read https://tangled.org/notplants.bsky.social/lichen.page/blob/main/.claude/commands/lichen.md, and explain the project. what is the malleable software framing? how can we install this and use this?