Compare commits
4 commits
98f46c8081
...
56c2402338
Author | SHA1 | Date | |
---|---|---|---|
|
56c2402338 | ||
|
381dcd1c1e | ||
|
4483828cf5 | ||
|
94e248b95e |
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -9,3 +9,6 @@ site
|
||||||
graph.png
|
graph.png
|
||||||
|
|
||||||
/preview
|
/preview
|
||||||
|
|
||||||
|
.jj
|
||||||
|
.direnv
|
||||||
|
|
13
Tuprules.tup
13
Tuprules.tup
|
@ -1,16 +1,17 @@
|
||||||
&root = .
|
&root = .
|
||||||
&build_root = build
|
&tmpl_dir = ./templates
|
||||||
|
&gen_tmpl_dir = ./build/templates
|
||||||
|
|
||||||
HTML_TEMPLATE = main.html
|
HTML_TEMPLATE = main.html
|
||||||
|
|
||||||
!html = | &(root)/templates/footer.html \
|
!html = | &(tmpl_dir)/<tmpl_group> \
|
||||||
|> ^b html %f^ \
|
|> ^b html %f^ \
|
||||||
pandoc --from markdown --to html \
|
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 \
|
--css &(root)/css/style.css \
|
||||||
--include-in-header=&(root)/templates/header.html \
|
--include-after-body=&(gen_tmpl_dir)/footer.html \
|
||||||
--include-before-body=&(root)/templates/nav.html \
|
|
||||||
--include-after-body=&(build_root)/templates/footer.html \
|
|
||||||
%f | sed 's|%%webRoot%%|&(root)|g' > %o \
|
%f | sed 's|%%webRoot%%|&(root)|g' > %o \
|
||||||
|> %B.html
|
|> %B.html
|
||||||
|
|
||||||
|
|
25
flake.lock
Normal file
25
flake.lock
Normal 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
19
flake.nix
Normal 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
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
3
justfile
3
justfile
|
@ -1,9 +1,6 @@
|
||||||
# vim: set ft=make :
|
# vim: set ft=make :
|
||||||
root := `pwd`
|
root := `pwd`
|
||||||
|
|
||||||
setup-ubuntu:
|
|
||||||
sudo apt install fuse3 pandoc
|
|
||||||
|
|
||||||
# Build static website
|
# Build static website
|
||||||
build:
|
build:
|
||||||
tup build
|
tup build
|
||||||
|
|
|
@ -5,6 +5,7 @@ pkgs.mkShell {
|
||||||
imagemagick
|
imagemagick
|
||||||
just
|
just
|
||||||
libavif
|
libavif
|
||||||
|
nushell
|
||||||
pandoc
|
pandoc
|
||||||
tup
|
tup
|
||||||
];
|
];
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
: |> ./generate_footer.sh > %o |> footer.html
|
: |> ./generate_footer.sh > %o |> footer.html ./<tmpl_group>
|
||||||
|
|
Loading…
Reference in a new issue