Skip to content

Commit

Permalink
feat: setup basic hugo site
Browse files Browse the repository at this point in the history
  • Loading branch information
davidsierradz committed Oct 12, 2022
1 parent 5f461eb commit 1fd7cc6
Show file tree
Hide file tree
Showing 4 changed files with 55 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
.direnv/*
result
15 changes: 15 additions & 0 deletions blog/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
baseURL = './'
languageCode = "en-us"
title = "blog"
theme = "etch"

[params]
description = "Things I consider interesting"
copyright = "Copyright © 2022 David Balam Sierra DiazGranados"
dark = "auto"
highlight = true

[minify]
[minify.tdewolff]
[minify.tdewolff.html]
keepQuotes = true
17 changes: 17 additions & 0 deletions flake.lock

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

22 changes: 22 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,37 @@
description = "A basic flake with a shell";
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
inputs.flake-utils.url = "github:numtide/flake-utils";
inputs.hugo-theme-etch = {
url = "github:LukasJoswiak/etch";
flake = false;
};

outputs = {
self,
nixpkgs,
flake-utils,
hugo-theme-etch,
}:
flake-utils.lib.eachDefaultSystem (system: let
pkgs = nixpkgs.legacyPackages.${system};
in {
packages.blog = pkgs.stdenv.mkDerivation {
name = "blog";
src = ./blog;
buildPhase = ''
mkdir -p themes
ln -s ${hugo-theme-etch} themes/etch
${pkgs.hugo}/bin/hugo --minify
'';
installPhase = ''
cp -r public $out
'';
meta = with pkgs.lib; {
description = "Things I consider interesting";
license = licenses.mit;
platforms = platforms.all;
};
};
devShell = pkgs.mkShell {
nativeBuildInputs = [pkgs.hugo];
buildInputs = [];
Expand Down

0 comments on commit 1fd7cc6

Please sign in to comment.