summaryrefslogtreecommitdiff
path: root/default.nix
diff options
context:
space:
mode:
authorQuentin Aristote <quentin@aristote.fr>2023-02-23 19:24:01 +0100
committerQuentin Aristote <quentin@aristote.fr>2023-02-23 19:48:27 +0100
commitff30f8878ee7e7a382eea23519783661b8fd0559 (patch)
tree628f1101ae366dc9016d20e2be1300cde9432c79 /default.nix
parentc48e260f85ea8f203e64cbc2a82ff774cf0b5a9f (diff)
add robots.txt
Diffstat (limited to 'default.nix')
-rw-r--r--default.nix7
1 files changed, 7 insertions, 0 deletions
diff --git a/default.nix b/default.nix
index 02a5455..4abdca3 100644
--- a/default.nix
+++ b/default.nix
@@ -28,6 +28,12 @@ let
"grid"
]));
+ robotsTXT = builtins.toFile "robots.txt" ''
+ user-agent: *
+ disallow: /static/
+ allow: /static/icon.png
+ '';
+
in pkgs.callPackage ({
# Packages
line-awesome, line-awesome-css, uncss, yuicompressor, imagemagick,
@@ -50,6 +56,7 @@ in pkgs.callPackage ({
set -o xtrace
mkdir $out && pushd "$_"
ln -sT ${index-html} index.html
+ ln -sT ${robotsTXT} robots.txt
popd
mkdir $out/static && pushd "$_"