diff --git a/packages/websites/landing/.envrc b/packages/websites/landing/.envrc index dbcfe1b..5d84e98 100644 --- a/packages/websites/landing/.envrc +++ b/packages/websites/landing/.envrc @@ -1 +1,2 @@ source ../../build-support/activate-shell +nix_direnv_watch_file project.nix diff --git a/packages/websites/landing/.gitignore b/packages/websites/landing/.gitignore new file mode 100644 index 0000000..9d67c17 --- /dev/null +++ b/packages/websites/landing/.gitignore @@ -0,0 +1,12 @@ +# hugo generated files +public/ +resources/_gen/ +assets/jsconfig.json +.hugo_build.lock +hugo_stats.json + +# nix config only +/config.toml +/config.yaml +/config.yml +/config.json diff --git a/packages/websites/landing/archetypes/default.md b/packages/websites/landing/archetypes/default.md new file mode 100644 index 0000000..00e77bd --- /dev/null +++ b/packages/websites/landing/archetypes/default.md @@ -0,0 +1,6 @@ +--- +title: "{{ replace .Name "-" " " | title }}" +date: {{ .Date }} +draft: true +--- + diff --git a/packages/websites/landing/project.nix b/packages/websites/landing/project.nix index 8fad7bf..a706c93 100644 --- a/packages/websites/landing/project.nix +++ b/packages/websites/landing/project.nix @@ -1,9 +1,26 @@ -{ pkgs, ... }: +{ lib, pkgs, self', ... }: +let + theme = self'.packages.gohugo-theme-ananke; + themeName = "ananke"; + themesDir = "${theme}/share/hugo/themes"; + + configFile = pkgs.writeText "hugo-config.json" (builtins.toJSON { + title = "Private Void | Zero-maintenance perfection"; + baseURL = "https://www.privatevoid.net/"; + languageCode = "en-us"; + theme = themeName; + inherit themesDir; + }); + hugoArgs = [ + "--config" configFile + ]; +in { projectShells.landing = { - tools = with pkgs; [ - hugo - ]; + commands.hugo = { + help = pkgs.hugo.meta.description; + command = "exec ${pkgs.hugo}/bin/hugo ${lib.concatStringsSep " " hugoArgs} \"$@\""; + }; }; }