diff --git a/.gitignore b/.gitignore index a9e1de6..b43cb21 100644 --- a/.gitignore +++ b/.gitignore @@ -9,6 +9,3 @@ site graph.png /preview - -.jj -.direnv diff --git a/Tuprules.tup b/Tuprules.tup index 3712e6e..744a6ce 100644 --- a/Tuprules.tup +++ b/Tuprules.tup @@ -1,17 +1,16 @@ &root = . -&tmpl_dir = ./templates -&gen_tmpl_dir = ./build/templates +&build_root = build HTML_TEMPLATE = main.html -!html = | &(tmpl_dir)/ \ +!html = | &(root)/templates/footer.html \ |> ^b html %f^ \ pandoc --from markdown --to html \ - --template=&(tmpl_dir)/$(HTML_TEMPLATE) \ - --include-in-header=&(tmpl_dir)/header.html \ - --include-before-body=&(tmpl_dir)/nav.html \ + --template=&(root)/templates/$(HTML_TEMPLATE) \ --css &(root)/css/style.css \ - --include-after-body=&(gen_tmpl_dir)/footer.html \ + --include-in-header=&(root)/templates/header.html \ + --include-before-body=&(root)/templates/nav.html \ + --include-after-body=&(build_root)/templates/footer.html \ %f | sed 's|%%webRoot%%|&(root)|g' > %o \ |> %B.html diff --git a/flake.lock b/flake.lock deleted file mode 100644 index 6bc678b..0000000 --- a/flake.lock +++ /dev/null @@ -1,25 +0,0 @@ -{ - "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 -} diff --git a/flake.nix b/flake.nix deleted file mode 100644 index b426747..0000000 --- a/flake.nix +++ /dev/null @@ -1,19 +0,0 @@ -{ - 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 - ]; - }; - }; -} diff --git a/justfile b/justfile index 36a8e8f..3822e79 100644 --- a/justfile +++ b/justfile @@ -1,6 +1,9 @@ # vim: set ft=make : root := `pwd` +setup-ubuntu: + sudo apt install fuse3 pandoc + # Build static website build: tup build diff --git a/shell.nix b/shell.nix index 0753dc8..dcde169 100644 --- a/shell.nix +++ b/shell.nix @@ -5,7 +5,6 @@ pkgs.mkShell { imagemagick just libavif - nushell pandoc tup ]; diff --git a/templates/Tupfile b/templates/Tupfile index f179092..45e0fb0 100644 --- a/templates/Tupfile +++ b/templates/Tupfile @@ -1 +1 @@ -: |> ./generate_footer.sh > %o |> footer.html ./ +: |> ./generate_footer.sh > %o |> footer.html