From 9bc56a96dc72266706701aa40ae84376b0f3904a Mon Sep 17 00:00:00 2001 From: robin Date: Mon, 1 Jun 2026 15:47:59 +0200 Subject: [PATCH] luau: meoww --- .editorconfig | 2 + .luaurc | 3 +- data/{about.md => about.tkt} | 14 +- ...ng-this-site.md => building-this-site.tkt} | 43 ++- ...orscheme.md => creating-a-colorscheme.tkt} | 10 +- ...rtio-picker.md => neovim-artio-picker.tkt} | 68 +++-- ...ion.md => neovim-native-configuration.tkt} | 180 +++---------- data/index.md | 21 -- data/index.tkt | 23 ++ ...e-toggle.md => artio-live-mode-toggle.tkt} | 0 .../{artio-released.md => artio-released.tkt} | 0 .../{aspen-released.md => aspen-released.tkt} | 0 .../{ebil-released.md => ebil-released.tkt} | 0 ...-release.md => evergarden-npm-release.tkt} | 8 +- ...release.md => evergarden-site-release.tkt} | 0 ...md => evergarden-sublime-text-release.tkt} | 0 ...e.md => evergarden-userstyles-release.tkt} | 9 +- .../{lylla-sections.md => lylla-sections.tkt} | 0 .../{mimi-released.md => mimi-released.tkt} | 0 ...te-zig-minimal.md => site-zig-minimal.tkt} | 0 lua/components/meta/date.luau | 9 + lua/components/meta/desc.luau | 7 + lua/components/postpageitem.luau | 20 +- lua/components/svg.luau | 4 +- lua/components/taglist.luau | 8 +- lua/init.luau | 27 +- lua/layouts/base.luau | 250 +++++++++++------- lua/pages/404.luau | 10 +- lua/pages/_empty.luau | 4 +- lua/pages/badges.luau | 22 +- lua/pages/blog.luau | 8 +- lua/pages/index.luau | 54 ++-- lua/pages/notes.luau | 10 +- lua/pages/post.luau | 28 +- lua/pages/rss.luau | 16 +- lua/pages/start.luau | 10 +- lua/partials/bloglist.luau | 8 +- lua/partials/footer.luau | 17 +- lua/partials/note.luau | 2 +- lua/partials/search.luau | 8 +- lua/partials/sitename.luau | 6 +- src/data.zig | 103 ++++---- src/lua_display.zig | 22 +- src/root.zig | 44 +-- src/router.zig | 37 ++- src/runtime/h.luau | 41 +-- src/runtime/maivi.luau | 79 +++++- stylua.toml | 2 +- test.luau | 2 +- 49 files changed, 680 insertions(+), 559 deletions(-) create mode 100644 .editorconfig rename data/{about.md => about.tkt} (73%) rename data/blog/{building-this-site.md => building-this-site.tkt} (73%) rename data/blog/{creating-a-colorscheme.md => creating-a-colorscheme.tkt} (97%) rename data/blog/{neovim-artio-picker.md => neovim-artio-picker.tkt} (94%) rename data/blog/{neovim-native-configuration.md => neovim-native-configuration.tkt} (81%) delete mode 100644 data/index.md create mode 100644 data/index.tkt rename data/notes/{artio-live-mode-toggle.md => artio-live-mode-toggle.tkt} (100%) rename data/notes/{artio-released.md => artio-released.tkt} (100%) rename data/notes/{aspen-released.md => aspen-released.tkt} (100%) rename data/notes/{ebil-released.md => ebil-released.tkt} (100%) rename data/notes/{evergarden-npm-release.md => evergarden-npm-release.tkt} (96%) rename data/notes/{evergarden-site-release.md => evergarden-site-release.tkt} (100%) rename data/notes/{evergarden-sublime-text-release.md => evergarden-sublime-text-release.tkt} (100%) rename data/notes/{evergarden-userstyles-release.md => evergarden-userstyles-release.tkt} (58%) rename data/notes/{lylla-sections.md => lylla-sections.tkt} (100%) rename data/notes/{mimi-released.md => mimi-released.tkt} (100%) rename data/notes/{site-zig-minimal.md => site-zig-minimal.tkt} (100%) create mode 100644 lua/components/meta/date.luau create mode 100644 lua/components/meta/desc.luau diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..490d928 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,2 @@ +[*.luau] +max_line_length = 80 diff --git a/.luaurc b/.luaurc index bd87ff3..c678188 100644 --- a/.luaurc +++ b/.luaurc @@ -5,6 +5,7 @@ "globals": [ "maivi", "h", - "this" + "this", + "Iter" ] } diff --git a/data/about.md b/data/about.tkt similarity index 73% rename from data/about.md rename to data/about.tkt index f84f39e..a657d99 100644 --- a/data/about.md +++ b/data/about.tkt @@ -2,7 +2,7 @@ title = "about me :)" +++ -###### ✨ i'm passionate about: +~ ✨ i'm passionate about: -###### 🌱 in my projects, i blend these passions together: +~ 🌱 in my projects, i blend these passions together: -> _"Among the roses, beneath the twilight."_ 🌙🌿 +
+ "Among the roses, beneath the twilight." 🌙🌿 +
-## how this site was build +== how this site was build this site is build using the following tools: -- zola, for static site generation +- [maivi], for html templating in luau - nix, for reproducible builds everywhere you can read more about it [here](/blog/building-this-site). + +[maivi]: https://codeberg.org/comfysage/site diff --git a/data/blog/building-this-site.md b/data/blog/building-this-site.tkt similarity index 73% rename from data/blog/building-this-site.md rename to data/blog/building-this-site.tkt index 26b4ddc..58b26f7 100644 --- a/data/blog/building-this-site.md +++ b/data/blog/building-this-site.tkt @@ -1,12 +1,12 @@ +++ -title = "building this site" +title = "[outdated] building this site" date = 2025-01-22 modified = 2026-01-07 desc = "my tiny adventure in static site generation" tags = site, +++ -## static site generation += static site generation while looking for a static site generator for my site i tried a few interesting tools, like hugo and astro. i even tried building my own ssg (which failed @@ -16,13 +16,13 @@ written in rust. zola uses tera templates to build sites with minimal effort. zola separates content from templates. where markdown files can specify which templates to use. -### templates +== templates here is my blog page. it specifies a template to use for the section. in this template i can use zola's section variables to create a dynamic posts page (which i'll get into in a bit). -```markdown +~~~ markdown +++ title = "blog" description = "questionable ideas put to paper" @@ -30,7 +30,7 @@ sort_by = "date" template = "pages/blog.html" page_template = "pages/post.html" +++ -``` +~~~ the blog page also specifies a `page_template`. this is the template that will be used for all child pages (my blogposts). @@ -38,7 +38,7 @@ be used for all child pages (my blogposts). in my `pages/blog.html` template i can use zola's section variables to iterate over all my blogposts and generate a list at build time. -```tera +~~~ tera {% block content %} {{ section.content | safe }} {% endblock content %} -``` +~~~ -## build and deploy += build and deploy to ease building and deploying the site i use nix to setup my tools and build. because the site is static i simply can use github pages to deploy. @@ -57,7 +57,7 @@ because the site is static i simply can use github pages to deploy. the nix builder simply takes zola as a buildinput and runs the build. i then copy the static content to the `$out` directory. -```nix +~~~ nix stdenvNoCC.mkDerivation { src = ./.; @@ -80,26 +80,23 @@ stdenvNoCC.mkDerivation { runHook postInstall ''; } -``` +~~~ deployment is done using a single github action you can find [here](https://codeberg.org/comfysage/site/src/commit/0b94d7338c1d7c50c09635b4d20fbeab552d58fd/.github/workflows/deploy.yml). - +< (note) ~ update: codeberg ci +< deployment is now done with codeberg ci using woodpecker using the config +< you can find [here][codeberg ci] -## resources +[codeberg ci]: https://codeberg.org/comfysage/site/src/commit/0b94d7338c1d7c50c09635b4d20fbeab552d58fd/.woodpecker/deploy.yaml + += resources