mirror of
https://github.com/RGBCube/HTMNIX
synced 2025-07-27 07:57:45 +00:00
Don't have some default site code and use proper paths
This commit is contained in:
parent
f0e1be1a7e
commit
8d3f0fdde6
4 changed files with 2 additions and 16 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -1,7 +1,5 @@
|
|||
*
|
||||
|
||||
!site/
|
||||
|
||||
!.gitignore
|
||||
!flake.lock
|
||||
|
||||
|
|
2
build.sh
2
build.sh
|
@ -19,7 +19,7 @@ for file in $(find site -type f); do
|
|||
if [[ ! "$file" =~ ^_ ]]; then
|
||||
if [[ "$file" =~ .nix$ ]]; then
|
||||
echo "Processing file $file to _${file%.nix}.html..."
|
||||
TARGET_FILE="$file" nix eval "$FLAKE_REF#result" --apply toString --raw > "_${file%.nix}.html"
|
||||
TARGET_FILE=$(realpath "$file") nix eval "$FLAKE_REF#result" --impure --raw --apply toString > "_${file%.nix}.html"
|
||||
echo "Done!"
|
||||
else
|
||||
echo "Copying file $file to _$file..."
|
||||
|
|
|
@ -74,9 +74,6 @@
|
|||
};
|
||||
};
|
||||
|
||||
result = let
|
||||
targetFile = builtins.getEnv "TARGET_FILE";
|
||||
targetFile' = if targetFile != "" then targetFile else "site/index.nix";
|
||||
in builtins.scopedImport { inherit (self) raw __findFile; inherit lib; } ./${targetFile'};
|
||||
result = builtins.scopedImport { inherit (self) raw __findFile; inherit lib; } /${builtins.getEnv "TARGET_FILE"};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,9 +0,0 @@
|
|||
<html>
|
||||
<head>
|
||||
<meta.>{charset="UTF-8";}
|
||||
<title>"Hello, internet!"<.title>
|
||||
<.head>
|
||||
<body>
|
||||
<p>"What the fuck is this?"<.p>
|
||||
<.body>
|
||||
<.html>
|
Loading…
Add table
Add a link
Reference in a new issue