From 910038a5e3a4e16d6adf1616681eef5ab911baa6 Mon Sep 17 00:00:00 2001 From: Romain Paquet Date: Fri, 14 Nov 2025 01:09:33 +0100 Subject: [PATCH] add project page for lila and render djot pages --- _config.ts | 3 ++- _djot.ts | 2 +- projects.md | 12 ------------ projects/index.dj | 17 +++++++++++++++++ projects/lila.dj | 42 ++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 62 insertions(+), 14 deletions(-) delete mode 100644 projects.md create mode 100644 projects/index.dj create mode 100644 projects/lila.dj diff --git a/_config.ts b/_config.ts index 857d31a..5cd394a 100644 --- a/_config.ts +++ b/_config.ts @@ -2,7 +2,7 @@ import lume from "lume/mod.ts"; import nav from "lume/plugins/nav.ts"; import codeHighlight from "lume/plugins/code_highlight.ts"; import googleFonts from "lume/plugins/google_fonts.ts"; -import { djotRender } from "./_djot.ts"; +import { djotLoader, djotRender } from "./_djot.ts"; const site = lume(); @@ -23,5 +23,6 @@ site.copy("favicon.svg"); site.data("djot", djotRender); site.filter("djot", djotRender); +site.loadPages([".dj"], djotLoader); export default site; diff --git a/_djot.ts b/_djot.ts index 940a0b5..277eb9e 100644 --- a/_djot.ts +++ b/_djot.ts @@ -14,7 +14,7 @@ export function djotRender(content: string): string { return djot.renderHTML(djot.parse(content)); } -export default async function djotLoader(path: string | URL) { +export async function djotLoader(path: string | URL) { const content = await Deno.readTextFile(path); const ast = djot.parse(content); diff --git a/projects.md b/projects.md deleted file mode 100644 index c44596b..0000000 --- a/projects.md +++ /dev/null @@ -1,12 +0,0 @@ -# Projects - -## Lila - -A simple programming language. It uses [Cranelift] as a compiler backend. - -## Myrtle - -A note-taking helper similar to [zk]. - -[Cranelift]: https://cranelift.dev -[zk]: https://zk-org.github.io/zk diff --git a/projects/index.dj b/projects/index.dj new file mode 100644 index 0000000..90a2989 --- /dev/null +++ b/projects/index.dj @@ -0,0 +1,17 @@ +# Projects + +## [Lila](./lila.dj) + +A simple programming language. It uses [Cranelift][] as a compiler backend. + +## Myrtle + +A note-taking helper similar to [zk][]. + +## Statice + +A static site generator supporting [Djot][]. + +[Cranelift]: https://cranelift.dev +[Djot]: https://djot.net +[zk]: https://zk-org.github.io/zk diff --git a/projects/lila.dj b/projects/lila.dj new file mode 100644 index 0000000..b87e93a --- /dev/null +++ b/projects/lila.dj @@ -0,0 +1,42 @@ +# Lila + +A simple programming language I make in my free time. +I'm trying to make it modular so I can easily try and compare different backends and tooling. + +## Status + +For now it can JIT-compile basic programs using [Cranelift][]. + +I'm still not decided on which language features I want to explore. + +## Source mirrors + +- [GitHub](https://github.com/rpqt/lila) +- [Gitea](https://git.turifer.dev/rpqt/lila) +- [SourceHut](https://git.sr.ht/~rpqt/lila) + +## Roadmap + +### Parsing + +- [x] Pest parser backend +- [ ] (wip) [Tree-sitter][] parser backend + + - [ ] (wip) Tree-sitter grammar -- [git][tree-sitter-lila] + - [ ] (wip) Parser based on the tree-sitter grammar + +### Static analysis + +- [x] Basic type checking + +### Codegen + +- [x] (wip) Cranelift JIT compiler +- [x] Basic CLI +- [ ] Run the compiler on Wasm +- [ ] Wasm codegen +- [ ] REPL + +[Cranelift]: https://cranelift.dev +[Tree-sitter]: https://tree-sitter.github.io/tree-sitter +[tree-sitter-lila]: https://git.sr.ht/~rpqt/tree-sitter-lila