forked from Fediversity/fediversity.eu
build up to style
This commit is contained in:
parent
923a5c3543
commit
9b110aeb71
17
flake.lock
17
flake.lock
|
@ -32,6 +32,22 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"mermaid": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1719905309,
|
||||||
|
"narHash": "sha256-pGjfHnIJ7QPVWN+XZZl63c535fuegyb6/EL+UmGhTQg=",
|
||||||
|
"owner": "hugomods",
|
||||||
|
"repo": "mermaid",
|
||||||
|
"rev": "c0c313df723dbac0e5dad65cb4794f5987b81d3b",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "hugomods",
|
||||||
|
"repo": "mermaid",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1728018373,
|
"lastModified": 1728018373,
|
||||||
|
@ -52,6 +68,7 @@
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"hugo-modules": "hugo-modules",
|
"hugo-modules": "hugo-modules",
|
||||||
"hugoplate": "hugoplate",
|
"hugoplate": "hugoplate",
|
||||||
|
"mermaid": "mermaid",
|
||||||
"nixpkgs": "nixpkgs"
|
"nixpkgs": "nixpkgs"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
50
flake.nix
50
flake.nix
|
@ -3,10 +3,12 @@
|
||||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||||
hugoplate.url = "github:zeon-studio/hugoplate";
|
hugoplate.url = "github:zeon-studio/hugoplate";
|
||||||
hugoplate.flake = false;
|
hugoplate.flake = false;
|
||||||
|
mermaid.url = "github:hugomods/mermaid";
|
||||||
|
mermaid.flake = false;
|
||||||
hugo-modules.url = "github:gethugothemes/hugo-modules";
|
hugo-modules.url = "github:gethugothemes/hugo-modules";
|
||||||
hugo-modules.flake = false;
|
hugo-modules.flake = false;
|
||||||
};
|
};
|
||||||
outputs = inputs@{ self, nixpkgs, hugoplate, ... }:
|
outputs = inputs@{ self, nixpkgs, ... }:
|
||||||
let
|
let
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
lib = nixpkgs.lib;
|
lib = nixpkgs.lib;
|
||||||
|
@ -15,26 +17,44 @@
|
||||||
{
|
{
|
||||||
packages.${system}.default =
|
packages.${system}.default =
|
||||||
let
|
let
|
||||||
|
lockfile = with builtins; (fromJSON (readFile ./flake.lock)).nodes;
|
||||||
|
module-sources = map
|
||||||
|
(x: {
|
||||||
|
source = inputs.${x};
|
||||||
|
path = with lockfile.${x}.original; "${type}.com/${owner}/${repo}";
|
||||||
|
})
|
||||||
|
([
|
||||||
|
"hugo-modules"
|
||||||
|
"mermaid"
|
||||||
|
]);
|
||||||
theme = "hugoplate";
|
theme = "hugoplate";
|
||||||
modules = with builtins; map (attrs: baseNameOf attrs.path) (fromTOML (readFile ./src/config/_default/module.toml)).imports;
|
|
||||||
in
|
in
|
||||||
pkgs.stdenv.mkDerivation
|
pkgs.stdenv.mkDerivation
|
||||||
{
|
{
|
||||||
name = "website";
|
name = "website";
|
||||||
src = ./src;
|
src = ./src;
|
||||||
buildInputs = with pkgs; [ go nodejs git ];
|
buildInputs = with pkgs; [ go nodejs git tree ];
|
||||||
buildPhase = ''
|
buildPhase =
|
||||||
# install theme
|
let
|
||||||
mkdir -p themes/${theme}
|
copy-modules = map
|
||||||
cat << EOF >> hugo.toml
|
(module: ''
|
||||||
theme = "${theme}"
|
mkdir -p themes/${module.path}
|
||||||
EOF
|
cp -r ${module.source}/* themes/${module.path}
|
||||||
cp -r ${inputs.${theme}}/* themes/${theme}
|
'')
|
||||||
# install modules
|
module-sources;
|
||||||
mkdir -p themes/github.com/gethugothemes/hugo-modules
|
in
|
||||||
cp -r ${toString (map (module: "${inputs.hugo-modules}/${module}") modules)} themes/github.com/gethugothemes/hugo-modules/
|
lib.concatStringsSep "\n" copy-modules +
|
||||||
${lib.getExe pkgs.hugo} --minify --logLevel info -d public
|
''
|
||||||
'';
|
# install theme
|
||||||
|
mkdir -p themes/${theme}
|
||||||
|
cat << EOF >> hugo.toml
|
||||||
|
theme = "${theme}"
|
||||||
|
EOF
|
||||||
|
cp -r ${inputs.${theme}}/* themes/${theme}
|
||||||
|
|
||||||
|
tree .
|
||||||
|
${lib.getExe pkgs.hugo} --minify --logLevel info -d public
|
||||||
|
'';
|
||||||
installPhase = "cp -r public $out";
|
installPhase = "cp -r public $out";
|
||||||
};
|
};
|
||||||
devShells.${system}.default =
|
devShells.${system}.default =
|
||||||
|
|
|
@ -2,92 +2,92 @@
|
||||||
extended = true
|
extended = true
|
||||||
min = "0.115.2"
|
min = "0.115.2"
|
||||||
|
|
||||||
# [[imports]]
|
[[imports]]
|
||||||
# path = "github.com/zeon-studio/hugoplate"
|
path = "github.com/hugomods/mermaid"
|
||||||
|
|
||||||
#[[imports]]
|
[[imports]]
|
||||||
#path = "github.com/gethugothemes/hugo-modules/search"
|
path = "github.com/gethugothemes/hugo-modules/search"
|
||||||
|
|
||||||
#[[imports]]
|
[[imports]]
|
||||||
#path = "github.com/gethugothemes/hugo-modules/pwa"
|
path = "github.com/gethugothemes/hugo-modules/pwa"
|
||||||
|
|
||||||
[[imports]]
|
[[imports]]
|
||||||
path = "github.com/gethugothemes/hugo-modules/images"
|
path = "github.com/gethugothemes/hugo-modules/images"
|
||||||
|
|
||||||
#[[imports]]
|
[[imports]]
|
||||||
#path = "github.com/gethugothemes/hugo-modules/videos"
|
path = "github.com/gethugothemes/hugo-modules/videos"
|
||||||
|
|
||||||
#[[imports]]
|
[[imports]]
|
||||||
#path = "github.com/gethugothemes/hugo-modules/icons/font-awesome"
|
path = "github.com/gethugothemes/hugo-modules/icons/font-awesome"
|
||||||
|
|
||||||
# [[imports]]
|
[[imports]]
|
||||||
# path = "github.com/gethugothemes/hugo-modules/icons/themify-icons"
|
path = "github.com/gethugothemes/hugo-modules/icons/themify-icons"
|
||||||
|
|
||||||
#[[imports]]
|
[[imports]]
|
||||||
#path = "github.com/gethugothemes/hugo-modules/gzip-caching"
|
path = "github.com/gethugothemes/hugo-modules/gzip-caching"
|
||||||
|
|
||||||
#[[imports]]
|
[[imports]]
|
||||||
#path = "github.com/gethugothemes/hugo-modules/adsense"
|
path = "github.com/gethugothemes/hugo-modules/adsense"
|
||||||
|
|
||||||
#[[imports]]
|
[[imports]]
|
||||||
#path = "github.com/gethugothemes/hugo-modules/accordion"
|
path = "github.com/gethugothemes/hugo-modules/accordion"
|
||||||
|
|
||||||
#[[imports]]
|
[[imports]]
|
||||||
#path = "github.com/gethugothemes/hugo-modules/table-of-contents"
|
path = "github.com/gethugothemes/hugo-modules/table-of-contents"
|
||||||
|
|
||||||
#[[imports]]
|
[[imports]]
|
||||||
#path = "github.com/gethugothemes/hugo-modules/tab"
|
path = "github.com/gethugothemes/hugo-modules/tab"
|
||||||
|
|
||||||
#[[imports]]
|
[[imports]]
|
||||||
#path = "github.com/gethugothemes/hugo-modules/modal"
|
path = "github.com/gethugothemes/hugo-modules/modal"
|
||||||
|
|
||||||
#[[imports]]
|
[[imports]]
|
||||||
#path = "github.com/gethugothemes/hugo-modules/gallery-slider"
|
path = "github.com/gethugothemes/hugo-modules/gallery-slider"
|
||||||
|
|
||||||
#[[imports]]
|
[[imports]]
|
||||||
#path = "github.com/gethugothemes/hugo-modules/components/preloader"
|
path = "github.com/gethugothemes/hugo-modules/components/preloader"
|
||||||
|
|
||||||
#[[imports]]
|
[[imports]]
|
||||||
#path = "github.com/gethugothemes/hugo-modules/components/social-share"
|
path = "github.com/gethugothemes/hugo-modules/components/social-share"
|
||||||
|
|
||||||
#[[imports]]
|
[[imports]]
|
||||||
#path = "github.com/gethugothemes/hugo-modules/components/cookie-consent"
|
path = "github.com/gethugothemes/hugo-modules/components/cookie-consent"
|
||||||
|
|
||||||
#[[imports]]
|
[[imports]]
|
||||||
#path = "github.com/gethugothemes/hugo-modules/components/custom-script"
|
path = "github.com/gethugothemes/hugo-modules/components/custom-script"
|
||||||
|
|
||||||
#[[imports]]
|
[[imports]]
|
||||||
#path = "github.com/gethugothemes/hugo-modules/components/render-link"
|
path = "github.com/gethugothemes/hugo-modules/components/render-link"
|
||||||
|
|
||||||
# [[imports]]
|
[[imports]]
|
||||||
# path = "github.com/gethugothemes/hugo-modules/components/valine-comment"
|
path = "github.com/gethugothemes/hugo-modules/components/valine-comment"
|
||||||
|
|
||||||
# [[imports]]
|
[[imports]]
|
||||||
# path = "github.com/gethugothemes/hugo-modules/components/crisp-chat"
|
path = "github.com/gethugothemes/hugo-modules/components/crisp-chat"
|
||||||
|
|
||||||
#[[imports]]
|
[[imports]]
|
||||||
#path = "github.com/gethugothemes/hugo-modules/shortcodes/button"
|
path = "github.com/gethugothemes/hugo-modules/shortcodes/button"
|
||||||
|
|
||||||
#[[imports]]
|
[[imports]]
|
||||||
#path = "github.com/gethugothemes/hugo-modules/shortcodes/notice"
|
path = "github.com/gethugothemes/hugo-modules/shortcodes/notice"
|
||||||
|
|
||||||
#[[imports]]
|
[[imports]]
|
||||||
#path = "github.com/gethugothemes/hugo-modules/seo-tools/basic-seo"
|
path = "github.com/gethugothemes/hugo-modules/seo-tools/basic-seo"
|
||||||
|
|
||||||
#[[imports]]
|
[[imports]]
|
||||||
#path = "github.com/gethugothemes/hugo-modules/seo-tools/site-verifications"
|
path = "github.com/gethugothemes/hugo-modules/seo-tools/site-verifications"
|
||||||
|
|
||||||
#[[imports]]
|
[[imports]]
|
||||||
#path = "github.com/gethugothemes/hugo-modules/seo-tools/google-tag-manager"
|
path = "github.com/gethugothemes/hugo-modules/seo-tools/google-tag-manager"
|
||||||
|
|
||||||
# [[imports]]
|
[[imports]]
|
||||||
# path = "github.com/gethugothemes/hugo-modules/seo-tools/baidu-analytics"
|
path = "github.com/gethugothemes/hugo-modules/seo-tools/baidu-analytics"
|
||||||
|
|
||||||
# [[imports]]
|
[[imports]]
|
||||||
# path = "github.com/gethugothemes/hugo-modules/seo-tools/matomo-analytics"
|
path = "github.com/gethugothemes/hugo-modules/seo-tools/matomo-analytics"
|
||||||
|
|
||||||
# [[imports]]
|
[[imports]]
|
||||||
# path = "github.com/gethugothemes/hugo-modules/seo-tools/plausible-analytics"
|
path = "github.com/gethugothemes/hugo-modules/seo-tools/plausible-analytics"
|
||||||
|
|
||||||
# [[imports]]
|
[[imports]]
|
||||||
# path = "github.com/gethugothemes/hugo-modules/seo-tools/counter-analytics"
|
path = "github.com/gethugothemes/hugo-modules/seo-tools/counter-analytics"
|
||||||
|
|
|
@ -62,14 +62,6 @@ author = "NGI Fediversity"
|
||||||
image = "images/logo.png"
|
image = "images/logo.png"
|
||||||
|
|
||||||
|
|
||||||
# site verifications
|
|
||||||
# verification module: https://github.com/gethugothemes/hugo-modules/tree/master/seo-tools/site-verifications
|
|
||||||
[site_verification]
|
|
||||||
google = "" # Your verification code
|
|
||||||
bing = "" # Your verification code
|
|
||||||
baidu = "" # Your verification code
|
|
||||||
facebook = "" # Your verification code
|
|
||||||
mastodon = "" # Your verification code
|
|
||||||
|
|
||||||
# cookies
|
# cookies
|
||||||
# cookies module: https://github.com/gethugothemes/hugo-modules/tree/master/components/cookie-consent
|
# cookies module: https://github.com/gethugothemes/hugo-modules/tree/master/components/cookie-consent
|
||||||
|
|
Reference in a new issue