diff --git a/.gitignore b/.gitignore index 6c06062..0d3112b 100644 --- a/.gitignore +++ b/.gitignore @@ -7,4 +7,3 @@ zig-pkg # dev .direnv/ -*.tar diff --git a/.nvim.lua b/.nvim.lua deleted file mode 100644 index b8cd975..0000000 --- a/.nvim.lua +++ /dev/null @@ -1,2 +0,0 @@ -vim.lsp.enable("lua_ls", false) -vim.lsp.enable("emmylua_ls") diff --git a/build.zig b/build.zig index 55c3062..d91a28d 100644 --- a/build.zig +++ b/build.zig @@ -13,30 +13,6 @@ pub fn build(b: *std.Build) !void { .optimize = optimize, }); - const exe_options = b.addOptions(); - mod.addOptions("opts", exe_options); - - const opt_version_string = b.option([]const u8, "version-string", "Override version string. Default is to find out with git."); - const version_slice = if (opt_version_string) |version| version else v: { - if (!std.process.can_spawn) { - std.debug.print("error: version info cannot be retrieved from git. version must be provided using -Dversion-string\n", .{}); - std.process.exit(1); - } - - var code: u8 = undefined; - const git_rev_untrimmed = try b.runAllowFail(&[_][]const u8{ - "git", - "-C", b.build_root.path orelse ".", // affects the --git-dir argument - "--git-dir", ".git", // affected by the -C argument - "rev-parse", "HEAD", - }, &code, .ignore); - const git_rev = std.mem.trim(u8, git_rev_untrimmed, " \n\r"); - - break :v git_rev; - }; - const version = try b.allocator.dupeZ(u8, version_slice); - exe_options.addOption([:0]const u8, "version", version); - const exe = b.addExecutable(.{ .name = "maivi", .root_module = b.createModule(.{ diff --git a/data/about.tkt b/data/about.tkt deleted file mode 100644 index 6524af5..0000000 --- a/data/about.tkt +++ /dev/null @@ -1,35 +0,0 @@ -+++ -title = "about me :)" -+++ - -~ ✨ i'm passionate about: - - - -~ 🌱 in my projects, i blend these passions together: - - - -
- "Among the roses, beneath the twilight." 🌙🌿 -
- -== how this site was build - -this site is build using the following tools: - -- [maivi], for html templating in lua -- 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.tkt b/data/blog/building-this-site.tkt deleted file mode 100644 index 58b26f7..0000000 --- a/data/blog/building-this-site.tkt +++ /dev/null @@ -1,102 +0,0 @@ -+++ -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 - -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 -miserably). in the end i discovered zola, simple static site generator -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 - -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 -+++ -title = "blog" -description = "questionable ideas put to paper" -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). - -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 -{% block content %} - {{ section.content | safe }} - -{% endblock content %} -~~~ - -= 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. - -the nix builder simply takes zola as a buildinput and runs the build. i then -copy the static content to the `$out` directory. - -~~~ nix -stdenvNoCC.mkDerivation { - src = ./.; - - nativeBuildInputs = [ - zola - ]; - - buildPhase = '' - runHook preBuild - zola build - runHook postBuild - ''; - - installPhase = '' - runHook preInstall - - mkdir -p $out - cp -r public/* $out - - 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] - -[codeberg ci]: https://codeberg.org/comfysage/site/src/commit/0b94d7338c1d7c50c09635b4d20fbeab552d58fd/.woodpecker/deploy.yaml - -= resources - -