Papyri is a programmable markup language, which can be compiled to HTML.

Papyri has a minimal syntax for common inline and block-level elements, and is particularly suitable for mixing text with source code and code listings. Documents written in Papyri are also programmable, as the language allows user-defined functions:

@fn greet($class?: str) $name: str -> {
    <span class?=$class>Hello, @bold $name!</span>

@greet World

You can click here to see the Papyri source for this page for a more substantial example, or read the tutorial.

Get Papyri

A compiler for the Papyri markup language, written in Rust, is available in the papyri-lang crate. If you have Rust then you can install the compiler with the following command:

cargo install papyri-lang

Then, use the command papyri filename.papyri to compile a Papyri source file, or papyri --help to see the command-line options.

The Papyri language and standard library are currently unstable. There may be breaking changes in the syntax and semantics of the language, informed by usage, as development continues.

If you do try it out and have ideas for improvements to the Papyri language or standard library, feel free to suggest these in the discussion forum.


Papyri is developed by Andrew Kay.

The default theme (used on this page) is heavily inspired by the ‘Echo’ theme for Nibbleblog, by Paulo Nunes. This theme uses three open source fonts:

The papyri-rs compiler uses the syntect libary for syntax highlighting.