diff --git a/home/index.org b/home/index.org index e69de29..fae8ad6 100644 --- a/home/index.org +++ b/home/index.org @@ -0,0 +1,16 @@ +#+ATTR_CTAG: project +#+ATTR_CLINK: https://gitea.redalder.org/Magic_RB/NixNG +#+ATTR_CIMAGE: /icons/nix-ng-greener-no-gradient.svg +#+BEGIN_SRC fundamental + A NixOS derivative with simpler design, currently replacing systemd with runit, + aiming to deliver lighter systems and containers. +#+END_SRC + +#+ATTR_CTAG: project +#+ATTR_CLINK: https://gitea.redalder.org/RedAlder/ra-containers +#+ATTR_CIMAGE: /icons/nix-flake.svg +#+BEGIN_SRC fundamental + Nix built, fully declarative and configurable container images. They are similar in + function to the official Docker container images and have similar APIs therefore are + a convenient replacement for your existing images, if you need more Nix in your +#+END_SRC diff --git a/make.el b/make.el index d9aca9b..690f20d 100644 --- a/make.el +++ b/make.el @@ -7,6 +7,8 @@ (require 'org) +(require 'cl-lib) + (require 'ox) (require 'ox-html) @@ -38,6 +40,28 @@ (defvar magic_rb/asset-include "\\(ttf\\|svg\\|jpg\\|gif\\|png\\|css\\|js\\|el\\|nb\\|ipynb\\|pdf\\|xml\\)") +(cl-defstruct (magic_rb/card (:constructor magic_rb/card-create) + (:copier nil)) + link image description) + +(defun magic_rb/cards-with-tag (tag) + (let ((symbol 'src-block) + (path buffer-file-name)) + (mapcar + (lambda (object) + (magic_rb/card-create + :link (car (org-element-property :attr_clink object)) + :image (car (org-element-property :attr_cimage object)) + :description (org-element-property :value object))) + (with-temp-buffer + (insert-file-contents path) + + (org-element-map (org-element-parse-buffer) symbol + (lambda (object) + (if (string-equal (car (org-element-property :attr_ctag object)) tag) + object + nil)) nil nil nil t))))) + (defun magic_rb/source-with-name (name symbol property) "" (string-trim diff --git a/templates/index.html b/templates/index.html index d5c12f8..222f563 100644 --- a/templates/index.html +++ b/templates/index.html @@ -7,36 +7,20 @@
- +{{:each (magic_rb/cards-with-tag "project")}} +
- +

NixNG

- A GNU/Linux distribution, similar to NixOS with the main distintion beings its - simpler design, akin to BSDs and Void Linux. It replaces SystemD with runit and in - the future OpenRC, this allows for much lighter systems, which are suitable for - running in containers. -

-
-
-
- -
- -
-
-

ra-containers

-

- Nix built, fully declarative and configurable container images. They are similar in - function to the official Docker container images and have similar APIs therefore are - a convenient replacement for your existing images, if you need more Nix in your - life. + {{magic_rb/card-description item}}

+{{:endeach}}