nix: expose the site content in our flake

This commit is contained in:
Kate Temkin 2024-04-27 01:10:42 -06:00
parent 980dc1b238
commit 050546d469
4 changed files with 27 additions and 36 deletions

View file

@ -1,34 +0,0 @@
+++
author = "Hugo Authors"
title = "Rich Content"
date = "2019-03-10"
description = "A brief description of Hugo Shortcodes"
tags = [
"shortcodes",
"privacy",
]
+++
Hugo ships with several [Built-in Shortcodes](https://gohugo.io/content-management/shortcodes/#use-hugos-built-in-shortcodes) for rich content, along with a [Privacy Config](https://gohugo.io/about/hugo-and-gdpr/) and a set of Simple Shortcodes that enable static and no-JS versions of various social media embeds.
<!--more-->
---
## YouTube Privacy Enhanced Shortcode
{{< youtube ZJthWmvUzzc >}}
<br>
---
## Twitter Simple Shortcode
{{< twitter_simple 1085870671291310081 >}}
<br>
---
## Vimeo Simple Shortcode
{{< vimeo_simple 48912912 >}}

View file

@ -7,9 +7,9 @@ content:
buttonPrimary:
label: "Why Lix?"
url: "#"
url: "/about#why-lix"
buttonSecondary:
label: "Start using lix"
url: ""
url: "/install"

View file

@ -18,6 +18,13 @@
pkgs = import nixpkgs { inherit system; };
in
{
# For local development...
devShell = pkgs.mkShell { buildInputs = [ pkgs.hugo pkgs.sass ]; };
# ... and remote deployment.
packages = {
site-content = pkgs.callPackage ./nix/site-content.nix {};
};
});
}

18
nix/site-content.nix Normal file
View file

@ -0,0 +1,18 @@
#
# Hugo website output.
# vim: et:ts=2:sw=2:
#
{ pkgs, ... }: pkgs.stdenv.mkDerivation {
name = "site-content";
src = ../.;
nativeBuildInputs = [ pkgs.hugo ];
buildPhase = ''
hugo -D -d _output
'';
installPhase = ''
cp -r _output $out
'';
}