From b52a477c516316e3a63768579f4340cae4da1453 Mon Sep 17 00:00:00 2001 From: Brendan Golden Date: Thu, 13 Feb 2025 13:54:56 +0000 Subject: [PATCH] feat: initial setup for hugo --- .gitignore | 11 +++++++ .gitmodules | 3 ++ archetypes/default.md | 5 +++ content/posts/my-first-post.md | 7 ++++ flake.lock | 60 ++++++++++++++++++++++++++++++++++ flake.nix | 24 ++++++++++++++ hugo.toml | 4 +++ themes/PaperMod | 1 + 8 files changed, 115 insertions(+) create mode 100644 .gitmodules create mode 100644 archetypes/default.md create mode 100644 content/posts/my-first-post.md create mode 100644 flake.lock create mode 100644 flake.nix create mode 100644 hugo.toml create mode 160000 themes/PaperMod diff --git a/.gitignore b/.gitignore index dce8b15..dc1bf85 100644 --- a/.gitignore +++ b/.gitignore @@ -26,3 +26,14 @@ test.* # Dealing with Mac users .DS_Store + +################################################### +# Hugo Stuff +################################################### +# Dont commit lockfiles used for building like this +.hugo_build.lock + +# public is generated +/public + +/**/_gen \ No newline at end of file diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..89af1b0 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "themes/PaperMod"] + path = themes/PaperMod + url = https://github.com/adityatelange/hugo-PaperMod.git diff --git a/archetypes/default.md b/archetypes/default.md new file mode 100644 index 0000000..c6f3fce --- /dev/null +++ b/archetypes/default.md @@ -0,0 +1,5 @@ ++++ +title = '{{ replace .File.ContentBaseName "-" " " | title }}' +date = {{ .Date }} +draft = true ++++ diff --git a/content/posts/my-first-post.md b/content/posts/my-first-post.md new file mode 100644 index 0000000..2c5db96 --- /dev/null +++ b/content/posts/my-first-post.md @@ -0,0 +1,7 @@ ++++ +title = 'My First Post' +date = 2025-02-13T13:26:35Z +draft = true ++++ + +Put yer markdown content here \ No newline at end of file diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..5fecbc5 --- /dev/null +++ b/flake.lock @@ -0,0 +1,60 @@ +{ + "nodes": { + "flake-utils": { + "inputs": { + "systems": "systems" + }, + "locked": { + "lastModified": 1731533236, + "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1739214665, + "narHash": "sha256-26L8VAu3/1YRxS8MHgBOyOM8xALdo6N0I04PgorE7UM=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "64e75cd44acf21c7933d61d7721e812eac1b5a0a", + "type": "github" + }, + "original": { + "id": "nixpkgs", + "ref": "nixos-unstable", + "type": "indirect" + } + }, + "root": { + "inputs": { + "flake-utils": "flake-utils", + "nixpkgs": "nixpkgs" + } + }, + "systems": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..88d0e2f --- /dev/null +++ b/flake.nix @@ -0,0 +1,24 @@ +{ + inputs = { + nixpkgs.url = "nixpkgs/nixos-unstable"; + + flake-utils.url = "github:numtide/flake-utils"; + }; + + outputs = { + self, + nixpkgs, + ... + } @ inputs: let + pkgs = nixpkgs.legacyPackages.x86_64-linux.pkgs; + in { + devShells.x86_64-linux.default = pkgs.mkShell { + name = "Hugo build env"; + nativeBuildInputs = [ + pkgs.hugo + ]; + buildInputs = []; +# shellHook = ''export EDITOR="${pkgs.nano}/bin/nano --nonewlines"; unset LD_LIBRARY_PATH;''; + }; + }; +} diff --git a/hugo.toml b/hugo.toml new file mode 100644 index 0000000..ef25111 --- /dev/null +++ b/hugo.toml @@ -0,0 +1,4 @@ +baseURL = 'https://example.org/' +languageCode = 'en-us' +title = 'My New Hugo Site' +theme = 'PaperMod' \ No newline at end of file diff --git a/themes/PaperMod b/themes/PaperMod new file mode 160000 index 0000000..a020be2 --- /dev/null +++ b/themes/PaperMod @@ -0,0 +1 @@ +Subproject commit a020be2137458dd0a1f4f3a024cd7b076931e9e3