-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Hugo v133 compatibliity fixes. Add direnv and a nix flake for develop…
…ment.
- Loading branch information
1 parent
d1b3dbf
commit 2078053
Showing
4 changed files
with
72 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
use flake |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
''; | ||
}; | ||
}; | ||
} |