Compare commits
11 Commits
f4df9e8a41
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| eb76904d6c | |||
| bd393a5e34 | |||
| dc32d8e8ba | |||
| fd08b610de | |||
| 17ce4a47c5 | |||
| db0760f8b4 | |||
| 7ab1231c4d | |||
| f46bca1b9e | |||
| ad21293862 | |||
| 2f6138bc7a | |||
| dd6d76f471 |
1
site/.gitignore
vendored
1
site/.gitignore
vendored
@@ -4,3 +4,4 @@ themes
|
||||
build
|
||||
storage
|
||||
node_modules
|
||||
diagrams/*.svg
|
||||
|
||||
18
site/Makefile
Normal file
18
site/Makefile
Normal file
@@ -0,0 +1,18 @@
|
||||
DIAGRAMS_IN := $(wildcard diagrams/*.typ)
|
||||
DIAGRAMS_OUT := $(DIAGRAMS_IN:%.typ=%.svg)
|
||||
|
||||
diagrams/%.svg: diagrams/%.typ
|
||||
typst compile $< $@
|
||||
|
||||
.PHONY: clean diagrams build serve
|
||||
|
||||
diagrams: $(DIAGRAMS_OUT)
|
||||
|
||||
clean:
|
||||
rm -rf diagrams/*.svg
|
||||
|
||||
build: diagrams
|
||||
zola build
|
||||
|
||||
serve: diagrams
|
||||
zola serve
|
||||
@@ -1,11 +1,10 @@
|
||||
- TODO: migrate into docs and replace contents of this file with backlink
|
||||
- TODO: [PWA support](https://abridge.pages.dev/overview-abridge/#pwa) for mobile sandbox
|
||||
- TODO: Atkinson Hyperlegible Next
|
||||
- TODO: tag example pages by demonstrated concept
|
||||
- TODO: document how to report bugs and get help
|
||||
- TODO: document security policy
|
||||
- TODO: cookbook for common Kerolox idioms
|
||||
|
||||
This directory hosts the Kerolox website.
|
||||
|
||||
The site is generated with [Zola](https://getzola.org), a minimalist static site generator.
|
||||
Documentation on how to contribute to the site itself lives in at `./content/contribute/site.md`.
|
||||
|
||||
- TODO: [PWA support](https://abridge.pages.dev/overview-abridge/#pwa) for mobile sandbox
|
||||
- TODO: document how to report bugs and get help
|
||||
- TODO: cookbook for common Kerolox idioms
|
||||
- TODO: tag example pages by demonstrated concept
|
||||
- TODO: favicon
|
||||
- TODO: add backlinks to each page's section
|
||||
|
||||
@@ -3,4 +3,6 @@ title = "Architecture"
|
||||
description = "A tour through Kerolox's codebase architecture."
|
||||
+++
|
||||
|
||||
{{ diagram(name="crates", alt="A block architecture diagram of every Rust crate in the Kerolox codebase.") }}
|
||||
|
||||
TODO
|
||||
|
||||
@@ -3,4 +3,6 @@ title = "Build from Source"
|
||||
description = "How to build Kerolox from source."
|
||||
+++
|
||||
|
||||
# Cloning the Repository
|
||||
|
||||
TODO
|
||||
|
||||
@@ -3,4 +3,6 @@ title = "Releases"
|
||||
description = "Guidelines for the Kerolox release process."
|
||||
+++
|
||||
|
||||
TODO
|
||||
{% help() %}
|
||||
Write documentation about Kerolox's release process.
|
||||
{% end %}
|
||||
|
||||
30
site/content/contribute/security.md
Normal file
30
site/content/contribute/security.md
Normal file
@@ -0,0 +1,30 @@
|
||||
+++
|
||||
title = "Security"
|
||||
description = "Kerolox's security policy and it affects contributions."
|
||||
+++
|
||||
|
||||
TODO
|
||||
|
||||
# npm
|
||||
|
||||
Unfortunately for everybody, JavaScript is the language of the web. Kerolox does its best to be free of dependencies on web technology, but occasionally, some JavaScript-based tooling is necessary. We encourage _secure_ use of npm whenever possible and avoid npm whenever security cannot be guaranteed.
|
||||
|
||||
[npm](https://www.npmjs.com/) and its package repository are the main tools for creating web-compatible JavaScript. It's also infamously vulnerable[^mini-shai-hulud][^tanstack][^satire][^colors-faker][^node-ipc][^event-stream] to [supply chain attacks](https://en.wikipedia.org/wiki/Supply_chain_attack). Because npm is configured to run arbitrary scripts while installing packages, this means that anybody installing dependencies from the npm package registry is at risk.
|
||||
|
||||
[^mini-shai-hulud]: [Mini Shai-Hulud attack](https://www.aikido.dev/blog/mini-shai-hulud-is-back-tanstack-compromised)
|
||||
|
||||
[^tanstack]: [Tanstack supply chain attack](https://tanstack.com/blog/npm-supply-chain-compromise-postmortem)
|
||||
|
||||
[^satire]: [A satire of npm security by Andrew Nesbitt](https://nesbitt.io/2026/02/03/incident-report-cve-2024-yikes.html)
|
||||
|
||||
[^colors-faker]: [Supply chain self-sabotage on `colors` and `faker`](https://www.bleepingcomputer.com/news/security/dev-corrupts-npm-libs-colors-and-faker-breaking-thousands-of-apps/)
|
||||
|
||||
[^node-ipc]: [Supply chain self-sabotage on `node-ipc`](https://www.bleepingcomputer.com/news/security/big-sabotage-famous-npm-package-deletes-files-to-protest-ukraine-war/)
|
||||
|
||||
[^event-stream]: [Supply chain attack on `event-stream`](https://blog.npmjs.org/post/180565383195/details-about-the-event-stream-incident)
|
||||
|
||||
- TODO: describe npm workarounds
|
||||
- TODO: CVE reporting policy
|
||||
- TODO: dependency updating strategy
|
||||
- npm-based stuff is under extra scrutiny
|
||||
- TODO automatic secret sanitation
|
||||
@@ -3,4 +3,41 @@ title = "Website"
|
||||
description = "How to contribute to the Kerolox website."
|
||||
+++
|
||||
|
||||
TODO
|
||||
This website is extremely important to the project because it contains the main onboarding documentation for new users. It also hosts contributor documentation such as what you're reading now. If you have ideas on how to improve it, please let us know!
|
||||
|
||||
{% help() %}
|
||||
Connect this invitation to concrete contact guidelines.
|
||||
{% end %}
|
||||
|
||||
# Dependencies
|
||||
|
||||
The site is generated using [Zola](https://www.getzola.org), a reasonably minimal static site generator. Each page is written in [Markdown](https://www.markdownguide.org/) and templated into HTML. You can find instructions to install Zola [here](https://www.getzola.org/documentation/getting-started/installation/).
|
||||
|
||||
To best communicate visual information throughout our documentation, we use [Typst](https://typst.app/) to generate diagrams during the site compilation process. It's a required dependency for building the site, so please follow [Typst's installation instructions](https://github.com/typst/typst#installation) to install it for your system.
|
||||
|
||||
We use the [Abridge](https://github.com/jieiku/abridge/) Zola theme to provide our styling and HTML templating. It provides lots of web accessibility features while staying lightweight. The theme _does_ use `npm` for some preprocessing, so please bear in mind [our npm security guidelines](@/contribute/security.md#npm) while customizing it. Use of npm for contributing to the site should not be necessary very often, though.
|
||||
|
||||
Abridge is included as a [Git submodule](https://git-scm.com/book/en/v2/Git-Tools-Submodules), so in order to build the website, you must update that submodule. If you've already [cloned the repository](@/contribute/build.md#cloning-the-repository), you can ensure that the Abridge submodule is updated correctly by running the following commands:
|
||||
|
||||
```sh
|
||||
git submodule init
|
||||
git submodule update
|
||||
```
|
||||
|
||||
# Building the Website
|
||||
|
||||
To build the website, run `make` in the `site` directory of the repository:
|
||||
|
||||
```sh
|
||||
make build
|
||||
```
|
||||
|
||||
This will automatically build all dependencies of the website, run Zola to compile the website itself, then place the results in `site/public`.
|
||||
|
||||
To rapidly iterate on the website, you can also use the `serve` target:
|
||||
|
||||
```sh
|
||||
make serve
|
||||
```
|
||||
|
||||
This runs Zola as an HTTP server of the site's content at `http://localhost:1111`. Note that while Zola will reload the _contents_ of the site, the _dependencies_ of the site, such as Typst diagrams, will _not_ be. To reload those, kill the server with `Ctrl+C` and run `make serve` again.
|
||||
|
||||
52
site/diagrams/crates.typ
Normal file
52
site/diagrams/crates.typ
Normal file
@@ -0,0 +1,52 @@
|
||||
#set page(width: auto, height: auto, fill: none, margin: 0em)
|
||||
#set text(font: "Atkinson Hyperlegible Next", size: 18pt, fill: white)
|
||||
#set grid(align: center + horizon)
|
||||
#let gutter = .45em
|
||||
#let stroke = (paint: gray, dash: "dashed")
|
||||
|
||||
#let block(height: 1em, cell) = pad(gutter, box(
|
||||
radius: 5pt,
|
||||
stroke: white,
|
||||
fill: black,
|
||||
inset: gutter,
|
||||
width: 100%,
|
||||
height: height + gutter * 2,
|
||||
cell,
|
||||
))
|
||||
|
||||
#grid(
|
||||
columns: (8em, 4em, 12em),
|
||||
|
||||
grid.cell(colspan: 3, block[cli]),
|
||||
|
||||
grid.hline(stroke: stroke),
|
||||
grid.vline(stroke: stroke, x: 1, start: 1),
|
||||
|
||||
pad(.5em, [Backend]),
|
||||
grid.cell(colspan: 2, pad(.5em, [Frontend])),
|
||||
|
||||
grid.cell(rowspan: 3, grid(
|
||||
block(height: 2em + gutter, [clingo]),
|
||||
block(height: 2em + gutter, [eval]),
|
||||
)),
|
||||
|
||||
grid.cell(
|
||||
colspan: 2,
|
||||
grid(
|
||||
columns: 4,
|
||||
block[lsp], block[check], block[dox],
|
||||
),
|
||||
),
|
||||
|
||||
grid.cell(colspan: 2, block[frontend]),
|
||||
grid.cell(colspan: 2, block[core]),
|
||||
|
||||
grid.hline(stroke: stroke),
|
||||
|
||||
grid.cell(
|
||||
colspan: 2,
|
||||
block[IR],
|
||||
),
|
||||
|
||||
block[tree-sitter-kerolox],
|
||||
)
|
||||
5
site/sass/abridge.scss
Normal file
5
site/sass/abridge.scss
Normal file
@@ -0,0 +1,5 @@
|
||||
@use 'style.scss';
|
||||
|
||||
@use '../themes/abridge/sass/abridge' with (
|
||||
$font: 'Atkinson Hyperlegible Next',
|
||||
);
|
||||
25
site/sass/style.scss
Normal file
25
site/sass/style.scss
Normal file
@@ -0,0 +1,25 @@
|
||||
.help-needed {
|
||||
display: inline-block;
|
||||
border-left: .4ch solid var(--cg);
|
||||
width: 40%;
|
||||
min-width: 60ch;
|
||||
padding: 0 1em 0;
|
||||
background-color: var(--c2);
|
||||
}
|
||||
|
||||
.help-wanted-header {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: baseline;
|
||||
gap: 1ch;
|
||||
padding-top: 1em;
|
||||
|
||||
img {
|
||||
height: 2em;
|
||||
align-self: center;
|
||||
}
|
||||
|
||||
h3 {
|
||||
margin: 0;
|
||||
}
|
||||
}
|
||||
23
site/static/assets/help-wanted.svg
Normal file
23
site/static/assets/help-wanted.svg
Normal file
@@ -0,0 +1,23 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
|
||||
<svg width="800px" height="800px" viewBox="0 0 16 16" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" class="si-glyph si-glyph-hammer-and-wrench">
|
||||
|
||||
<title>Hammer-and-wrench</title>
|
||||
|
||||
<defs>
|
||||
|
||||
</defs>
|
||||
<g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
||||
<g transform="translate(0.000000, 1.000000)" fill="#434343">
|
||||
<g>
|
||||
<path d="M14.217,14.949 C14.748,15.482 15.076,15.103 15.512,14.668 C15.948,14.233 16.326,13.904 15.795,13.372 C15.795,13.372 8.393,5.977 6.565,4.154 L4.987,5.731 L14.217,14.949 L14.217,14.949 Z" class="si-glyph-fill">
|
||||
|
||||
</path>
|
||||
<path d="M2.048,7.015 L2.662,6.411 C2.662,6.411 2.391,5.668 2.788,5.312 C3.185,4.956 3.855,5.176 3.855,5.176 L6.01,3.093 C6.01,3.093 5.859,2.01 6.059,1.81 C6.259,1.61 8.494,0.521 8.71,0.303 L8.251,-0.156 C8.251,-0.156 5.123,0.22 4.784,0.558 C4.585,0.758 3.096,2.262 2.034,3.324 C2.034,3.324 2.3,4.083 1.95,4.433 C1.599,4.784 0.809,4.533 0.809,4.533 C0.436,4.906 0.186,5.155 0.186,5.155 C-0.077,5.42 0.078,5.792 0.401,6.115 L1.087,6.801 C1.412,7.125 1.785,7.278 2.048,7.015 L2.048,7.015 Z" class="si-glyph-fill">
|
||||
|
||||
</path>
|
||||
</g>
|
||||
<path d="M11.733,5.515 C12.81,6.026 14.161,5.869 15.055,4.975 C15.745,4.285 16.019,3.336 15.872,2.444 L14.351,3.963 L13.057,4.284 L11.595,2.842 L11.938,1.505 L13.445,0.017 C12.552,-0.129 11.543,0.082 10.853,0.773 C9.958,1.668 9.836,3.052 10.347,4.13 L9.353,5.123 C9.79,5.558 10.257,6.025 10.741,6.508 L11.733,5.515 L11.733,5.515 Z" class="si-glyph-fill">
|
||||
|
||||
</path>
|
||||
<path d="M7.432,10.119 L5.927,8.615 L4.619,9.924 C4.537,10.004 4.479,10.095 4.438,10.19 C4.361,10.16 4.318,10.159 4.291,10.17 C4.041,10.087 3.777,10.031 3.5,10.031 C2.119,10.031 1,11.136 1,12.5 C1,13.864 2.119,14.969 3.5,14.969 C4.881,14.969 6,13.864 6,12.5 C6,12.217 5.941,11.949 5.854,11.696 C5.849,11.672 5.848,11.65 5.834,11.615 C5.938,11.572 6.036,11.514 6.122,11.427 L7.432,10.119 L7.432,10.119 Z M3.5,13.938 C2.688,13.938 2.031,13.295 2.031,12.5 C2.031,11.705 2.687,11.062 3.5,11.062 C4.313,11.062 4.969,11.705 4.969,12.5 C4.969,13.295 4.312,13.938 3.5,13.938 L3.5,13.938 Z" class="si-glyph-fill">
|
||||
|
After Width: | Height: | Size: 2.3 KiB |
BIN
site/static/fonts/AtkinsonHyperlegibleNext-Bold.ttf
Normal file
BIN
site/static/fonts/AtkinsonHyperlegibleNext-Bold.ttf
Normal file
Binary file not shown.
BIN
site/static/fonts/AtkinsonHyperlegibleNext-BoldItalic.ttf
Normal file
BIN
site/static/fonts/AtkinsonHyperlegibleNext-BoldItalic.ttf
Normal file
Binary file not shown.
BIN
site/static/fonts/AtkinsonHyperlegibleNext-Italic.ttf
Normal file
BIN
site/static/fonts/AtkinsonHyperlegibleNext-Italic.ttf
Normal file
Binary file not shown.
BIN
site/static/fonts/AtkinsonHyperlegibleNext-Regular.ttf
Normal file
BIN
site/static/fonts/AtkinsonHyperlegibleNext-Regular.ttf
Normal file
Binary file not shown.
93
site/static/fonts/OFL.txt
Normal file
93
site/static/fonts/OFL.txt
Normal file
@@ -0,0 +1,93 @@
|
||||
Copyright 2020-2024 The Atkinson Hyperlegible Next Project Authors (https://github.com/googlefonts/atkinson-hyperlegible-next)
|
||||
|
||||
This Font Software is licensed under the SIL Open Font License, Version 1.1.
|
||||
This license is copied below, and is also available with a FAQ at:
|
||||
https://openfontlicense.org
|
||||
|
||||
|
||||
-----------------------------------------------------------
|
||||
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
|
||||
-----------------------------------------------------------
|
||||
|
||||
PREAMBLE
|
||||
The goals of the Open Font License (OFL) are to stimulate worldwide
|
||||
development of collaborative font projects, to support the font creation
|
||||
efforts of academic and linguistic communities, and to provide a free and
|
||||
open framework in which fonts may be shared and improved in partnership
|
||||
with others.
|
||||
|
||||
The OFL allows the licensed fonts to be used, studied, modified and
|
||||
redistributed freely as long as they are not sold by themselves. The
|
||||
fonts, including any derivative works, can be bundled, embedded,
|
||||
redistributed and/or sold with any software provided that any reserved
|
||||
names are not used by derivative works. The fonts and derivatives,
|
||||
however, cannot be released under any other type of license. The
|
||||
requirement for fonts to remain under this license does not apply
|
||||
to any document created using the fonts or their derivatives.
|
||||
|
||||
DEFINITIONS
|
||||
"Font Software" refers to the set of files released by the Copyright
|
||||
Holder(s) under this license and clearly marked as such. This may
|
||||
include source files, build scripts and documentation.
|
||||
|
||||
"Reserved Font Name" refers to any names specified as such after the
|
||||
copyright statement(s).
|
||||
|
||||
"Original Version" refers to the collection of Font Software components as
|
||||
distributed by the Copyright Holder(s).
|
||||
|
||||
"Modified Version" refers to any derivative made by adding to, deleting,
|
||||
or substituting -- in part or in whole -- any of the components of the
|
||||
Original Version, by changing formats or by porting the Font Software to a
|
||||
new environment.
|
||||
|
||||
"Author" refers to any designer, engineer, programmer, technical
|
||||
writer or other person who contributed to the Font Software.
|
||||
|
||||
PERMISSION & CONDITIONS
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of the Font Software, to use, study, copy, merge, embed, modify,
|
||||
redistribute, and sell modified and unmodified copies of the Font
|
||||
Software, subject to the following conditions:
|
||||
|
||||
1) Neither the Font Software nor any of its individual components,
|
||||
in Original or Modified Versions, may be sold by itself.
|
||||
|
||||
2) Original or Modified Versions of the Font Software may be bundled,
|
||||
redistributed and/or sold with any software, provided that each copy
|
||||
contains the above copyright notice and this license. These can be
|
||||
included either as stand-alone text files, human-readable headers or
|
||||
in the appropriate machine-readable metadata fields within text or
|
||||
binary files as long as those fields can be easily viewed by the user.
|
||||
|
||||
3) No Modified Version of the Font Software may use the Reserved Font
|
||||
Name(s) unless explicit written permission is granted by the corresponding
|
||||
Copyright Holder. This restriction only applies to the primary font name as
|
||||
presented to the users.
|
||||
|
||||
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
|
||||
Software shall not be used to promote, endorse or advertise any
|
||||
Modified Version, except to acknowledge the contribution(s) of the
|
||||
Copyright Holder(s) and the Author(s) or with their explicit written
|
||||
permission.
|
||||
|
||||
5) The Font Software, modified or unmodified, in part or in whole,
|
||||
must be distributed entirely under this license, and must not be
|
||||
distributed under any other license. The requirement for fonts to
|
||||
remain under this license does not apply to any document created
|
||||
using the Font Software.
|
||||
|
||||
TERMINATION
|
||||
This license becomes null and void if any of the above conditions are
|
||||
not met.
|
||||
|
||||
DISCLAIMER
|
||||
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
|
||||
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
|
||||
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
|
||||
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
|
||||
OTHER DEALINGS IN THE FONT SOFTWARE.
|
||||
8
site/templates/shortcodes/diagram.html
Normal file
8
site/templates/shortcodes/diagram.html
Normal file
@@ -0,0 +1,8 @@
|
||||
<figure
|
||||
class="diagram"
|
||||
role="img"
|
||||
aria-label="{{ alt }}"
|
||||
>
|
||||
{{- load_data(path="diagrams/" ~ name ~ ".svg") | safe -}}
|
||||
<figcaption>{{ alt | markdown(inline=true) }}</figcaption>
|
||||
</figure>
|
||||
9
site/templates/shortcodes/help.html
Normal file
9
site/templates/shortcodes/help.html
Normal file
@@ -0,0 +1,9 @@
|
||||
<div class="help-needed">
|
||||
<div class="help-wanted-header">
|
||||
<img src="{{ get_url(path='/assets/help-wanted.svg') }}"/>
|
||||
<h3>Help wanted!</h3>
|
||||
<a href="{{ get_url(path='/contribute/')}}">How do I help?</a>
|
||||
</div>
|
||||
|
||||
{{ body | markdown | safe }}
|
||||
</div>
|
||||
@@ -18,6 +18,13 @@ theme = "catppuccin-mocha"
|
||||
|
||||
[extra]
|
||||
|
||||
fonts = [
|
||||
{ url = "fonts/AtkinsonHyperlegibleNext-Bold.ttf" },
|
||||
{ url = "fonts/AtkinsonHyperlegibleNext-BoldItalic.ttf" },
|
||||
{ url = "fonts/AtkinsonHyperlegibleNext-Italic.ttf" },
|
||||
{ url = "fonts/AtkinsonHyperlegibleNext-Regular.ttf" },
|
||||
]
|
||||
|
||||
[[extra.menu]]
|
||||
url = "tutorial"
|
||||
name = "Tutorial"
|
||||
|
||||
Reference in New Issue
Block a user