-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.papyri
79 lines (57 loc) · 3.09 KB
/
index.papyri
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
@include `defs.lib`
@let(urls=@dict::new(
this_source = `https://github.com/kaya3/papyri/blob/master/index.papyri`,
tutorial = `tutorial.html`,
rust_lang = `https://www.rust-lang.org/`,
papyri_rs = `https://crates.io/crates/papyri-lang`,
gh_discussions = `https://github.com/kaya3/papyri/discussions`,
me = `https://andrewkay.name`,
nibbleblog = `https://github.com/syndicatefx/nibbleblog-themes`,
paulo_nunes = `https://syndicatefx.com/`,
roboto = `https://fonts.google.com/specimen/Roboto`,
iosevka = `https://be5invis.github.io/Iosevka/`,
fontawesome = `https://fontawesome.com/free`,
syntect = `https://github.com/trishume/syntect`,
).)
@page(`Home`)...
@h1 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:
```papyri
@fn greet($class?: str) $name: str -> {
<span class?=$class>Hello, @bold $name!</span>
}
@greet World
```
You can @href($urls::this_source) {click here to see the Papyri source for this page} for a more
substantial example, or read the @href($urls::tutorial) tutorial.
@h2 {Get Papyri}
A compiler for the Papyri markup language, written in @href($urls::rust_lang) Rust, is available in the
@href($urls::papyri_rs) {@b {papyri-lang} crate}. If you have Rust then you can install the compiler
with the following command:
@shell ```
cargo install papyri-lang
```
Then, use the command @kbd `papyri filename.papyri` to compile a Papyri source file, or @kbd `papyri --help`
to see the command-line options.
@info {
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 @href($urls::gh_discussions) {discussion forum}.
}
@h2 {Credits}
Papyri is developed by @href($urls::me) {Andrew Kay}.
The default theme (used on this page) is heavily inspired by the @href($urls::nibbleblog) {'Echo' theme
for Nibbleblog}, by @href($urls::paulo_nunes) {Paulo Nunes}. This theme uses three open source fonts:
[
{The main body text is Google's @href($urls::roboto) Roboto.},
{The monospace font `Iosevka Papyri` is a custom build of @href($urls::iosevka) Iosevka.#
@footnote {Specifically, it is built using the `term` option to disable ligatures, and the
character variants `cv01`, `cv04`, `cv08`, `cv12`, `cv14`, `cv17`, `cv19`, `cv25`, `cv36`,
`cv39`, `cv43`, `cv44`, `cv47`, `cv49`, `cv51` and `cv52`.}},
{The left-margin icons are from the @href($urls::fontawesome) {Font Awesome Free} project.},
]
The @b {papyri-rs} compiler uses the @href($urls::syntect) syntect libary for syntax highlighting.