diff --git a/machines/moritz-server/website/root/config.toml b/machines/moritz-server/website/root/config.toml index d7d05a2..cd3df49 100644 --- a/machines/moritz-server/website/root/config.toml +++ b/machines/moritz-server/website/root/config.toml @@ -9,11 +9,14 @@ description = "Stay a while :)" compile_sass = true # Whether to build a search index to be used later on by a JavaScript library -build_search_index = true +build_search_index = false # NOTE: enable this when adding a search script # The site theme to use. theme = "anemone" +# When set to "true", a feed is automatically generated. +generate_feeds = false + [markdown] # Whether to do syntax highlighting # Theme can be customised by setting the `highlight_theme` variable to a theme supported by Zola diff --git a/machines/moritz-server/website/root/content/_index.md b/machines/moritz-server/website/root/content/_index.md index c95e864..86ffefa 100644 --- a/machines/moritz-server/website/root/content/_index.md +++ b/machines/moritz-server/website/root/content/_index.md @@ -1,3 +1,7 @@ +++ +++ -Hello World! + +# Links +- {{ mastodon_root(text="mastodon") }} +- [git](https://git.moritzboeh.me/) +- [mail](mailto:contact@moritz.place) diff --git a/machines/moritz-server/website/root/default.nix b/machines/moritz-server/website/root/default.nix index ee987fb..e87e930 100644 --- a/machines/moritz-server/website/root/default.nix +++ b/machines/moritz-server/website/root/default.nix @@ -22,5 +22,16 @@ installPhase = "cp -r public $out"; }; in { - services.nginx.virtualHosts."moritz.place".locations."/".root = "${package}"; + services.nginx.virtualHosts."moritz.place".root = "${package}"; + services.nginx.virtualHosts."moritz.place".locations."/" = { + index = "index.html"; + tryFiles = ''"''${uri}.html" $uri $uri/ =404''; + }; + services.nginx.virtualHosts."moritz.place".extraConfig = '' + error_page 404 /404.html; + + location = /404.html { + internal; + } + ''; } diff --git a/machines/moritz-server/website/root/templates/robots.txt b/machines/moritz-server/website/root/templates/robots.txt new file mode 100644 index 0000000..34d4b42 --- /dev/null +++ b/machines/moritz-server/website/root/templates/robots.txt @@ -0,0 +1,5 @@ +User-agent: * +Allow: /$ +Allow: /{{ get_url(path="sitemap.xml") }} +Disallow: / +Sitemap: {{ get_url(path="sitemap.xml") }} diff --git a/machines/moritz-server/website/root/templates/shortcodes/mastodon_footer.html b/machines/moritz-server/website/root/templates/shortcodes/mastodon_footer.html new file mode 100644 index 0000000..81498cb --- /dev/null +++ b/machines/moritz-server/website/root/templates/shortcodes/mastodon_footer.html @@ -0,0 +1 @@ + diff --git a/machines/moritz-server/website/root/templates/shortcodes/mastodon_root.html b/machines/moritz-server/website/root/templates/shortcodes/mastodon_root.html new file mode 100644 index 0000000..e3d777b --- /dev/null +++ b/machines/moritz-server/website/root/templates/shortcodes/mastodon_root.html @@ -0,0 +1 @@ +{{ text | safe }}