-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
8 lines (8 loc) · 4.69 KB
/
index.html
1
2
3
4
5
6
7
8
<!DOCTYPE html>
<html><head><title>Papyri: a programmable markup language</title><meta charset="utf-8"><link rel="stylesheet" type="text/css" href="./papyri.css"></head><body><header><nav data-title="Navigation"><ul><li><p><a href="./">Home</a></p><ul><li><a href="#get_papyri"> Get Papyri</a></li><li><a href="#credits"> Credits</a></li></ul></li><li><a href="./tutorial.html">Tutorial</a></li></ul></nav></header><article><h1><a class="anchor" href=""><i class="anchor-icon fas fa-link"></i> Papyri</a></h1><p>Papyri is a programmable markup language, which can be compiled to HTML.</p><p>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:</p><pre class="panel listing"><code class="syntax-highlight lang-papyri"><span class="line" data-line-no="1"><span class="keyword">@fn</span> <span class="name-def">greet</span><span class="lparen" data-paren-no="1">(</span><span class="name">$class</span><span class="op">?:</span> str<span class="rparen" data-paren-no="1">)</span> <span class="name">$name</span><span class="op">:</span> str <span class="op">-></span> <span class="lparen" data-paren-no="2">{</span></span>
<span class="line" data-line-no="2"> <span class="op"><</span><span class="name">span</span> class<span class="op">?=</span><span class="name">$class</span><span class="op">></span>Hello<span class="op">,</span> <span class="decorator">@bold</span> <span class="name">$name</span><span class="op">!</span></span></span>
<span class="line" data-line-no="3"><span class="rparen" data-paren-no="2">}</span></span>
<span class="line" data-line-no="4"></span>
<span class="line" data-line-no="5"><span class="decorator">@greet</span> World</span>
</code></pre><p>You can <a href="https://github.com/kaya3/papyri/blob/master/index.papyri">click here to see the Papyri source for this page</a> for a more substantial example, or read the <a href="tutorial.html">tutorial</a>.</p><h2 id="get_papyri"><a class="anchor" href="#get_papyri"><i class="anchor-icon fas fa-hashtag"></i> Get Papyri</a></h2><p>A compiler for the Papyri markup language, written in <a href="https://www.rust-lang.org/">Rust</a>, is available in the <a href="https://crates.io/crates/papyri-lang"><b>papyri-lang</b> crate</a>. If you have Rust then you can install the compiler with the following command:</p><pre class="panel listing"><code><span class="line" data-line-no="1">cargo install papyri-lang</span>
</code></pre><p>Then, use the command <kbd>papyri filename.papyri</kbd> to compile a Papyri source file, or <kbd>papyri --help</kbd> to see the command-line options.</p><p><a class="anchor"><i class="anchor-icon fas fa-info-circle"></i></a></p><div class="info panel"><p>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.</p><p>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 <a href="https://github.com/kaya3/papyri/discussions">discussion forum</a>.</p></div><h2 id="credits"><a class="anchor" href="#credits"><i class="anchor-icon fas fa-hashtag"></i> Credits</a></h2><p>Papyri is developed by <a href="https://andrewkay.name">Andrew Kay</a>.</p><p>The default theme (used on this page) is heavily inspired by the <a href="https://github.com/syndicatefx/nibbleblog-themes">‘Echo’ theme for Nibbleblog</a>, by <a href="https://syndicatefx.com/">Paulo Nunes</a>. This theme uses three open source fonts:</p><ul><li>The main body text is Google’s <a href="https://fonts.google.com/specimen/Roboto">Roboto</a>.</li><li>The monospace font <code>Iosevka Papyri</code> is a custom build of <a href="https://be5invis.github.io/Iosevka/">Iosevka</a>.<a class="footnote-ref"></a><span class="footnote panel">Specifically, it is built using the <code>term</code> option to disable ligatures, and the character variants <code>cv01</code>, <code>cv04</code>, <code>cv08</code>, <code>cv12</code>, <code>cv14</code>, <code>cv17</code>, <code>cv19</code>, <code>cv25</code>, <code>cv36</code>, <code>cv39</code>, <code>cv43</code>, <code>cv44</code>, <code>cv47</code>, <code>cv49</code>, <code>cv51</code> and <code>cv52</code>.</span></li><li>The left-margin icons are from the <a href="https://fontawesome.com/free">Font Awesome Free</a> project.</li></ul><p>The <b>papyri-rs</b> compiler uses the <a href="https://github.com/trishume/syntect">syntect</a> libary for syntax highlighting.</p></article><script type="text/javascript" src="./papyri.js"></script></body></html>