diff --git a/README.md b/README.md index 6c0ee82..771afff 100644 --- a/README.md +++ b/README.md @@ -19,9 +19,15 @@ $ zola serve Send changes to https://git.clan.lol/clan/clan-homepage - ## To update the website ``` $ nix run .#deploy ``` + + +## Create a new post + +``` +$ nix run .#new-post "September Changelog" +``` diff --git a/content/blog/hello-world.md b/content/blog/2023-05-01-hello-world.md similarity index 100% rename from content/blog/hello-world.md rename to content/blog/2023-05-01-hello-world.md diff --git a/flake-parts/new-post.nix b/flake-parts/new-post.nix new file mode 100644 index 0000000..7af88f8 --- /dev/null +++ b/flake-parts/new-post.nix @@ -0,0 +1,41 @@ +{ + perSystem = { + lib, + pkgs, + self', + ... + }: { + apps.new-post.program = builtins.toString (pkgs.writeShellScript "new-post.sh" '' + export PATH="${lib.makeBinPath [ + pkgs.coreutils pkgs.gitMinimal + ]}" + if [ -z "$1" ]; then + echo "Usage: new-post.sh