Skip to content

Commit

Permalink
Hugo v133 compatibliity fixes. Add direnv and a nix flake for develop…
Browse files Browse the repository at this point in the history
…ment.
  • Loading branch information
paperdigits committed Sep 2, 2024
1 parent d1b3dbf commit 2078053
Show file tree
Hide file tree
Showing 4 changed files with 72 additions and 1 deletion.
1 change: 1 addition & 0 deletions .envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
use flake
2 changes: 1 addition & 1 deletion config/_default/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ markup:
taxonomies:
tag: tags
author: author
disableKinds: ['taxonomyTerm']
disableKinds: ['taxonomy']
outputFormats:
SearchIndex:
mediaType: "application/json"
Expand Down
27 changes: 27 additions & 0 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

43 changes: 43 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
{
description = "An environment for the Hugo static site generator ";

inputs = {
nixpkgs = {
url = "github:NixOS/nixpkgs/nixpkgs-unstable";
};
};

outputs = { self, nixpkgs, ... }:
let
system = "x86_64-linux";
in
{
devShells."${system}".default =
let
pkgs = import nixpkgs {
inherit system;
};
in
pkgs.mkShell {
packages = with pkgs; [
hugo
yarn
lychee
];
shellHook = ''
PROJECTDIR=`pwd`
hugo-deploy() {
echo "This doesn't do anything, but maybe it will one day."
}
hugo-server() {
hugo server --disableFastRender -verbose
}
check-links() {
cd $PROJECTDIR/content && lychee . && cd $PROJECTDIR
}
# hugo-server
'';
};
};
}

0 comments on commit 2078053

Please sign in to comment.