Compare commits

..

4 commits

Author SHA1 Message Date
Fabien Freling 56c2402338 fix variant path for footer generated file 2024-11-21 16:26:54 +01:00
Fabien Freling 381dcd1c1e remove ubuntu setup 2024-11-19 17:44:01 +01:00
Fabien Freling 4483828cf5 add jujutsu 2024-11-19 17:42:21 +01:00
Fabien Freling 94e248b95e switch to flake 2024-11-19 15:13:02 +01:00
7 changed files with 56 additions and 10 deletions

3
.gitignore vendored
View file

@ -9,3 +9,6 @@ site
graph.png
/preview
.jj
.direnv

View file

@ -1,16 +1,17 @@
&root = .
&build_root = build
&tmpl_dir = ./templates
&gen_tmpl_dir = ./build/templates
HTML_TEMPLATE = main.html
!html = | &(root)/templates/footer.html \
!html = | &(tmpl_dir)/<tmpl_group> \
|> ^b html %f^ \
pandoc --from markdown --to html \
--template=&(root)/templates/$(HTML_TEMPLATE) \
--template=&(tmpl_dir)/$(HTML_TEMPLATE) \
--include-in-header=&(tmpl_dir)/header.html \
--include-before-body=&(tmpl_dir)/nav.html \
--css &(root)/css/style.css \
--include-in-header=&(root)/templates/header.html \
--include-before-body=&(root)/templates/nav.html \
--include-after-body=&(build_root)/templates/footer.html \
--include-after-body=&(gen_tmpl_dir)/footer.html \
%f | sed 's|%%webRoot%%|&(root)|g' > %o \
|> %B.html

25
flake.lock Normal file
View file

@ -0,0 +1,25 @@
{
"nodes": {
"nixpkgs": {
"locked": {
"lastModified": 1731890469,
"narHash": "sha256-D1FNZ70NmQEwNxpSSdTXCSklBH1z2isPR84J6DQrJGs=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "5083ec887760adfe12af64830a66807423a859a7",
"type": "github"
},
"original": {
"id": "nixpkgs",
"type": "indirect"
}
},
"root": {
"inputs": {
"nixpkgs": "nixpkgs"
}
}
},
"root": "root",
"version": 7
}

19
flake.nix Normal file
View file

@ -0,0 +1,19 @@
{
description = "Website";
outputs = { self, nixpkgs }:
let pkgs = nixpkgs.legacyPackages.x86_64-linux;
in {
devShell.x86_64-linux = with pkgs;
mkShell {
nativeBuildInputs = [
imagemagick
just
libavif
libjxl
pandoc
tup
];
};
};
}

View file

@ -1,9 +1,6 @@
# vim: set ft=make :
root := `pwd`
setup-ubuntu:
sudo apt install fuse3 pandoc
# Build static website
build:
tup build

View file

@ -5,6 +5,7 @@ pkgs.mkShell {
imagemagick
just
libavif
nushell
pandoc
tup
];

View file

@ -1 +1 @@
: |> ./generate_footer.sh > %o |> footer.html
: |> ./generate_footer.sh > %o |> footer.html ./<tmpl_group>