Papyri
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.
Credits
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 main body text is Google’s Roboto.
- The monospace font
Iosevka Papyri
is a custom build of Iosevka.Specifically, it is built using theterm
option to disable ligatures, and the character variantscv01
,cv04
,cv08
,cv12
,cv14
,cv17
,cv19
,cv25
,cv36
,cv39
,cv43
,cv44
,cv47
,cv49
,cv51
andcv52
. - The left-margin icons are from the Font Awesome Free project.
The papyri-rs compiler uses the syntect libary for syntax highlighting.