commit def7b1a01fa873d3417ea0fea9bb19a63087a468 Author: Vinzenz Schroeter Date: Sun Apr 6 12:53:20 2025 +0200 initial project setup diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..ad23815 --- /dev/null +++ b/.gitignore @@ -0,0 +1,9 @@ +.direnv + +# build artifacts +/result +/public +_gen + +# downloaded by nix +themes/hugo-theme-m10c diff --git a/.hugo_build.lock b/.hugo_build.lock new file mode 100644 index 0000000..e69de29 diff --git a/archetypes/default.md b/archetypes/default.md new file mode 100644 index 0000000..25b6752 --- /dev/null +++ b/archetypes/default.md @@ -0,0 +1,5 @@ ++++ +date = '{{ .Date }}' +draft = true +title = '{{ replace .File.ContentBaseName "-" " " | title }}' ++++ diff --git a/assets/.gitkeep b/assets/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/content/index.md b/content/index.md new file mode 100644 index 0000000..943e03f --- /dev/null +++ b/content/index.md @@ -0,0 +1 @@ +this is index.md diff --git a/content/posts/hello-world.md b/content/posts/hello-world.md new file mode 100644 index 0000000..a995a00 --- /dev/null +++ b/content/posts/hello-world.md @@ -0,0 +1,7 @@ ++++ +date = '2025-04-06T12:24:08+02:00' +draft = true +title = 'Hello World' ++++ + +# this is a test diff --git a/data/.gitkeep b/data/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..5e4a8c8 --- /dev/null +++ b/flake.lock @@ -0,0 +1,27 @@ +{ + "nodes": { + "nixpkgs": { + "locked": { + "lastModified": 1743703532, + "narHash": "sha256-s1KLDALEeqy+ttrvqV3jx9mBZEvmthQErTVOAzbjHZs=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "bdb91860de2f719b57eef819b5617762f7120c70", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-24.11", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "nixpkgs": "nixpkgs" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..2557ba1 --- /dev/null +++ b/flake.nix @@ -0,0 +1,97 @@ +{ + description = "Flake for the contents of https://zerforschen.plus"; + + inputs = { + nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-24.11"; + }; + + outputs = + { self, nixpkgs }: + let + supported-systems = [ + "x86_64-linux" + "aarch64-linux" + ]; + forAllSystems = + f: + nixpkgs.lib.genAttrs supported-systems ( + system: + f rec { + pkgs = nixpkgs.legacyPackages.${system}; + inherit system; + } + ); + in + { + packages = forAllSystems ( + { pkgs, ... }: + rec { + hugo-theme-m10c = pkgs.stdenv.mkDerivation { + pname = "hugo-theme-m10c"; + homepage = "https://themes.gohugo.io/themes/hugo-theme-m10c/"; + version = ""; + + src = pkgs.fetchFromGitHub { + owner = "vaga"; + repo = "hugo-theme-m10c"; + rev = "862c6e941be9bc46ce8adc6a2fa9e984ba647d6f"; + hash = "sha256-wcJSGjL/u43hPLblPmUhusqiMmadVBWJhihRinRXqzg="; + }; + + installPhase = '' + mkdir -p $out + cp -r * $out + ''; + }; + + zerforschen-plus-content = pkgs.stdenv.mkDerivation { + name = "zerforschen-plus-content"; + + # Source directory containing your Hugo project + src = ./.; + + # Build dependencies + nativeBuildInputs = [ + pkgs.hugo + ]; + + preBuildPhase = '' + ''; + + # Build phase - run Hugo to generate the site + buildPhase = '' + # Copy in theme before building website + mkdir -p themes/hugo-theme-m10c + cp -r ${hugo-theme-m10c}/* themes/hugo-theme-m10c/ + + hugo + ''; + + # Install phase - copy the public directory to the output + installPhase = '' + mkdir -p $out + cp -r public/* $out/ + ''; + }; + + default = zerforschen-plus-content; + } + ); + + devShells = forAllSystems ( + { pkgs, system, ... }: + { + default = pkgs.mkShellNoCC rec { + inputsFrom = [ self.packages.${system}.default ]; + + shellHook = '' + mkdir -p themes + ln -snf "${self.packages.${system}.hugo-theme-m10c}" themes/hugo-theme-m10c + ''; + }; + } + ); + + formatter = forAllSystems ({ pkgs, ... }: pkgs.nixfmt-rfc-style); + }; +} diff --git a/hugo.toml b/hugo.toml new file mode 100644 index 0000000..56e3283 --- /dev/null +++ b/hugo.toml @@ -0,0 +1,4 @@ +baseURL = 'https://zerforschen.plus' +languageCode = 'en-us' +title = 'zerforschen+' +theme = 'hugo-theme-m10c' diff --git a/i18n/.gitkeep b/i18n/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/layouts/.gitkeep b/layouts/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/static/.gitkeep b/static/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/themes/.gitkeep b/themes/.gitkeep new file mode 100644 index 0000000..e69de29