forked from Fediversity/fediversity.eu
WIP: hugo build
This commit is contained in:
commit
5bf721a182
61
flake.lock
Normal file
61
flake.lock
Normal file
|
@ -0,0 +1,61 @@
|
||||||
|
{
|
||||||
|
"nodes": {
|
||||||
|
"hugo-modules": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1727238273,
|
||||||
|
"narHash": "sha256-WSZJiDh1XPg9cFFwjnPyjhpMy3TEDhBIb0UMwrCahV4=",
|
||||||
|
"owner": "gethugothemes",
|
||||||
|
"repo": "hugo-modules",
|
||||||
|
"rev": "d2b5d05977e8e49fd2a05f145dc1201e410f4f92",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "gethugothemes",
|
||||||
|
"repo": "hugo-modules",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"hugoplate": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1727854001,
|
||||||
|
"narHash": "sha256-ggBxZfXrGRJZBQfvfwJsTYSZSjvlK9Qi80PgOgAp6es=",
|
||||||
|
"owner": "zeon-studio",
|
||||||
|
"repo": "hugoplate",
|
||||||
|
"rev": "c32ba3e0d751fa49948db453e25f168c03fcf6c3",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "zeon-studio",
|
||||||
|
"repo": "hugoplate",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nixpkgs": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1728018373,
|
||||||
|
"narHash": "sha256-NOiTvBbRLIOe5F6RbHaAh6++BNjsb149fGZd1T4+KBg=",
|
||||||
|
"owner": "NixOS",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "bc947f541ae55e999ffdb4013441347d83b00feb",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "NixOS",
|
||||||
|
"ref": "nixos-unstable",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": {
|
||||||
|
"inputs": {
|
||||||
|
"hugo-modules": "hugo-modules",
|
||||||
|
"hugoplate": "hugoplate",
|
||||||
|
"nixpkgs": "nixpkgs"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": "root",
|
||||||
|
"version": 7
|
||||||
|
}
|
47
flake.nix
Normal file
47
flake.nix
Normal file
|
@ -0,0 +1,47 @@
|
||||||
|
{
|
||||||
|
inputs = {
|
||||||
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||||
|
hugoplate.url = "github:zeon-studio/hugoplate";
|
||||||
|
hugoplate.flake = false;
|
||||||
|
hugo-modules.url = "github:gethugothemes/hugo-modules";
|
||||||
|
hugo-modules.flake = false;
|
||||||
|
};
|
||||||
|
outputs = inputs@{ self, nixpkgs, hugoplate, ... }:
|
||||||
|
let
|
||||||
|
system = "x86_64-linux";
|
||||||
|
lib = nixpkgs.lib;
|
||||||
|
pkgs = nixpkgs.legacyPackages.${system};
|
||||||
|
in
|
||||||
|
{
|
||||||
|
packages.${system}.default =
|
||||||
|
let
|
||||||
|
theme = "hugoplate";
|
||||||
|
modules = with builtins; map (attrs: baseNameOf attrs.path) (fromTOML (readFile ./src/config/_default/module.toml)).imports;
|
||||||
|
in
|
||||||
|
pkgs.stdenv.mkDerivation
|
||||||
|
{
|
||||||
|
name = "website";
|
||||||
|
src = ./src;
|
||||||
|
buildInputs = with pkgs; [ go nodejs git ];
|
||||||
|
buildPhase = ''
|
||||||
|
# install theme
|
||||||
|
mkdir -p themes/${theme}
|
||||||
|
cat << EOF >> hugo.toml
|
||||||
|
theme = "${theme}"
|
||||||
|
EOF
|
||||||
|
cp -r ${inputs.${theme}}/* themes/${theme}
|
||||||
|
# install modules
|
||||||
|
mkdir -p themes/github.com/gethugothemes/hugo-modules
|
||||||
|
cp -r ${toString (map (module: "${inputs.hugo-modules}/${module}") modules)} themes/github.com/gethugothemes/hugo-modules/
|
||||||
|
${lib.getExe pkgs.hugo} --minify --logLevel info -d public
|
||||||
|
'';
|
||||||
|
installPhase = "cp -r public $out";
|
||||||
|
};
|
||||||
|
devShells.${system}.default =
|
||||||
|
pkgs.mkShell {
|
||||||
|
packages = [
|
||||||
|
pkgs.hugo
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
5
src/archetypes/default.md
Normal file
5
src/archetypes/default.md
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
+++
|
||||||
|
title = '{{ replace .File.ContentBaseName "-" " " | title }}'
|
||||||
|
date = {{ .Date }}
|
||||||
|
draft = true
|
||||||
|
+++
|
6
src/config/_default/languages.toml
Executable file
6
src/config/_default/languages.toml
Executable file
|
@ -0,0 +1,6 @@
|
||||||
|
################ English language ##################
|
||||||
|
[en]
|
||||||
|
languageName = "En"
|
||||||
|
languageCode = "en-gb"
|
||||||
|
contentDir = "content/english"
|
||||||
|
weight = 1
|
81
src/config/_default/menus.en.toml
Executable file
81
src/config/_default/menus.en.toml
Executable file
|
@ -0,0 +1,81 @@
|
||||||
|
############# English navigation ##############
|
||||||
|
|
||||||
|
# main menu
|
||||||
|
[[main]]
|
||||||
|
name = "For You"
|
||||||
|
weight = 1
|
||||||
|
hasChildren = true
|
||||||
|
|
||||||
|
[[main]]
|
||||||
|
parent = "For You"
|
||||||
|
name = "Individuals"
|
||||||
|
pageRef = "/Individuals"
|
||||||
|
|
||||||
|
[[main]]
|
||||||
|
parent = "For You"
|
||||||
|
name = "Developers"
|
||||||
|
pageRef = "/Developers"
|
||||||
|
|
||||||
|
[[main]]
|
||||||
|
parent = "For You"
|
||||||
|
name = "European Commission"
|
||||||
|
pageRef = "/EC"
|
||||||
|
|
||||||
|
[[main]]
|
||||||
|
weight = 2
|
||||||
|
name = "Consortium"
|
||||||
|
hasChildren = true
|
||||||
|
|
||||||
|
[[main]]
|
||||||
|
parent = "Consortium"
|
||||||
|
name = "Open Internet Discourse"
|
||||||
|
pageRef = "/OID"
|
||||||
|
|
||||||
|
[[main]]
|
||||||
|
parent = "Consortium"
|
||||||
|
name = "NLnet"
|
||||||
|
pageRef = "/NLnet"
|
||||||
|
|
||||||
|
[[main]]
|
||||||
|
parent = "Consortium"
|
||||||
|
name = "Tweag"
|
||||||
|
pageRef = "/Tweag"
|
||||||
|
|
||||||
|
[[main]]
|
||||||
|
parent = "Consortium"
|
||||||
|
name = "NORDUnet"
|
||||||
|
pageRef = "/NORDUnet"
|
||||||
|
|
||||||
|
[[main]]
|
||||||
|
weight = 3
|
||||||
|
name = "Fediversity"
|
||||||
|
pageRef = "Fediversity"
|
||||||
|
|
||||||
|
[[main]]
|
||||||
|
weight = 4
|
||||||
|
name = "Grants"
|
||||||
|
pageRef = "Grants"
|
||||||
|
|
||||||
|
[[main]]
|
||||||
|
weight = 5
|
||||||
|
name = "Events"
|
||||||
|
pageRef = "Events"
|
||||||
|
|
||||||
|
[[main]]
|
||||||
|
weight = 6
|
||||||
|
name = "News"
|
||||||
|
pageRef = "Blog"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# footer menu
|
||||||
|
[[footer]]
|
||||||
|
name = "About"
|
||||||
|
pageRef = "fediversity"
|
||||||
|
weight = 1
|
||||||
|
|
||||||
|
[[footer]]
|
||||||
|
name = "Privacy Policy"
|
||||||
|
pageRef = "/privacy-policy"
|
||||||
|
weight = 3
|
93
src/config/_default/module.toml
Normal file
93
src/config/_default/module.toml
Normal file
|
@ -0,0 +1,93 @@
|
||||||
|
[hugoVersion]
|
||||||
|
extended = true
|
||||||
|
min = "0.115.2"
|
||||||
|
|
||||||
|
# [[imports]]
|
||||||
|
# path = "github.com/zeon-studio/hugoplate"
|
||||||
|
|
||||||
|
#[[imports]]
|
||||||
|
#path = "github.com/gethugothemes/hugo-modules/search"
|
||||||
|
|
||||||
|
#[[imports]]
|
||||||
|
#path = "github.com/gethugothemes/hugo-modules/pwa"
|
||||||
|
|
||||||
|
[[imports]]
|
||||||
|
path = "github.com/gethugothemes/hugo-modules/images"
|
||||||
|
|
||||||
|
#[[imports]]
|
||||||
|
#path = "github.com/gethugothemes/hugo-modules/videos"
|
||||||
|
|
||||||
|
#[[imports]]
|
||||||
|
#path = "github.com/gethugothemes/hugo-modules/icons/font-awesome"
|
||||||
|
|
||||||
|
# [[imports]]
|
||||||
|
# path = "github.com/gethugothemes/hugo-modules/icons/themify-icons"
|
||||||
|
|
||||||
|
#[[imports]]
|
||||||
|
#path = "github.com/gethugothemes/hugo-modules/gzip-caching"
|
||||||
|
|
||||||
|
#[[imports]]
|
||||||
|
#path = "github.com/gethugothemes/hugo-modules/adsense"
|
||||||
|
|
||||||
|
#[[imports]]
|
||||||
|
#path = "github.com/gethugothemes/hugo-modules/accordion"
|
||||||
|
|
||||||
|
#[[imports]]
|
||||||
|
#path = "github.com/gethugothemes/hugo-modules/table-of-contents"
|
||||||
|
|
||||||
|
#[[imports]]
|
||||||
|
#path = "github.com/gethugothemes/hugo-modules/tab"
|
||||||
|
|
||||||
|
#[[imports]]
|
||||||
|
#path = "github.com/gethugothemes/hugo-modules/modal"
|
||||||
|
|
||||||
|
#[[imports]]
|
||||||
|
#path = "github.com/gethugothemes/hugo-modules/gallery-slider"
|
||||||
|
|
||||||
|
#[[imports]]
|
||||||
|
#path = "github.com/gethugothemes/hugo-modules/components/preloader"
|
||||||
|
|
||||||
|
#[[imports]]
|
||||||
|
#path = "github.com/gethugothemes/hugo-modules/components/social-share"
|
||||||
|
|
||||||
|
#[[imports]]
|
||||||
|
#path = "github.com/gethugothemes/hugo-modules/components/cookie-consent"
|
||||||
|
|
||||||
|
#[[imports]]
|
||||||
|
#path = "github.com/gethugothemes/hugo-modules/components/custom-script"
|
||||||
|
|
||||||
|
#[[imports]]
|
||||||
|
#path = "github.com/gethugothemes/hugo-modules/components/render-link"
|
||||||
|
|
||||||
|
# [[imports]]
|
||||||
|
# path = "github.com/gethugothemes/hugo-modules/components/valine-comment"
|
||||||
|
|
||||||
|
# [[imports]]
|
||||||
|
# path = "github.com/gethugothemes/hugo-modules/components/crisp-chat"
|
||||||
|
|
||||||
|
#[[imports]]
|
||||||
|
#path = "github.com/gethugothemes/hugo-modules/shortcodes/button"
|
||||||
|
|
||||||
|
#[[imports]]
|
||||||
|
#path = "github.com/gethugothemes/hugo-modules/shortcodes/notice"
|
||||||
|
|
||||||
|
#[[imports]]
|
||||||
|
#path = "github.com/gethugothemes/hugo-modules/seo-tools/basic-seo"
|
||||||
|
|
||||||
|
#[[imports]]
|
||||||
|
#path = "github.com/gethugothemes/hugo-modules/seo-tools/site-verifications"
|
||||||
|
|
||||||
|
#[[imports]]
|
||||||
|
#path = "github.com/gethugothemes/hugo-modules/seo-tools/google-tag-manager"
|
||||||
|
|
||||||
|
# [[imports]]
|
||||||
|
# path = "github.com/gethugothemes/hugo-modules/seo-tools/baidu-analytics"
|
||||||
|
|
||||||
|
# [[imports]]
|
||||||
|
# path = "github.com/gethugothemes/hugo-modules/seo-tools/matomo-analytics"
|
||||||
|
|
||||||
|
# [[imports]]
|
||||||
|
# path = "github.com/gethugothemes/hugo-modules/seo-tools/plausible-analytics"
|
||||||
|
|
||||||
|
# [[imports]]
|
||||||
|
# path = "github.com/gethugothemes/hugo-modules/seo-tools/counter-analytics"
|
101
src/config/_default/params.toml
Executable file
101
src/config/_default/params.toml
Executable file
|
@ -0,0 +1,101 @@
|
||||||
|
#################### default parameters ################################
|
||||||
|
# favicon module: https://github.com/gethugothemes/hugo-modules/tree/master/images#favicon-implementation
|
||||||
|
favicon = "images/favicon.png"
|
||||||
|
# logo module: https://github.com/gethugothemes/hugo-modules/tree/master/images#logo-implementation
|
||||||
|
logo = "images/ngi_fedi_full.svg"
|
||||||
|
logo_darkmode = "images/logo-darkmode.png"
|
||||||
|
# use `px` or `x` with logo_width, example: "100px".
|
||||||
|
# Note: logo_width is not work with .svg file
|
||||||
|
logo_width = "160px"
|
||||||
|
logo_height = "32px"
|
||||||
|
# if logo_webp set false, will not generate WEBP version of logo | default is true
|
||||||
|
logo_webp = true
|
||||||
|
# logo text will only show when logo is missing.
|
||||||
|
logo_text = "Hugoplate"
|
||||||
|
# navbar fixed to top
|
||||||
|
navbar_fixed = true
|
||||||
|
# theme-mode
|
||||||
|
theme_switcher = false
|
||||||
|
theme_default = "system" # available options [light/dark/system]
|
||||||
|
# Main Sections
|
||||||
|
mainSections = ["blog"]
|
||||||
|
# contact form action
|
||||||
|
contact_form_action = "#" # contact form works with [https://airform.io/] or [https://formspree.io]
|
||||||
|
# google tag manager, see https://developers.google.com/tag-manager/
|
||||||
|
google_tag_manager = "" # example: G-XXXXXXXXXX
|
||||||
|
google_adsense = "" # example: ca-pub-xxxxxxxxxxxxxxxx
|
||||||
|
# custom script on header, example: custom_script= "<script>console.log(\"Hello World\")</script>"
|
||||||
|
custom_script = ""
|
||||||
|
# copyright
|
||||||
|
# copyright = "Designed & Developed by [Zeon Studio](https://zeon.studio)"
|
||||||
|
|
||||||
|
# Preloader
|
||||||
|
# preloader module: https://github.com/gethugothemes/hugo-modules/tree/master/components/preloader
|
||||||
|
[preloader]
|
||||||
|
enable = false
|
||||||
|
preloader = "" # use jpg, png, svg or gif format.
|
||||||
|
|
||||||
|
# Navigation button
|
||||||
|
[navigation_button]
|
||||||
|
enable = true
|
||||||
|
label = "Contact"
|
||||||
|
link = "contact"
|
||||||
|
|
||||||
|
# search
|
||||||
|
# search module: https://github.com/gethugothemes/hugo-modules/tree/master/search
|
||||||
|
[search]
|
||||||
|
enable = false
|
||||||
|
primary_color = "#121212"
|
||||||
|
include_sections = ["blog"]
|
||||||
|
show_image = true
|
||||||
|
show_description = true
|
||||||
|
show_tags = true
|
||||||
|
show_categories = true
|
||||||
|
|
||||||
|
|
||||||
|
# seo meta data for OpenGraph / Twitter Card
|
||||||
|
# seo module: https://github.com/gethugothemes/hugo-modules/tree/master/seo-tools/basic-seo
|
||||||
|
[metadata]
|
||||||
|
keywords = ["fediverse", "nixos", "open source"]
|
||||||
|
description = "Fediversity Project"
|
||||||
|
author = "NGI Fediversity"
|
||||||
|
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 module: https://github.com/gethugothemes/hugo-modules/tree/master/components/cookie-consent
|
||||||
|
[cookies]
|
||||||
|
enable = false
|
||||||
|
expire_days = 60
|
||||||
|
content = "This site uses cookies. By continuing to use this website, you agree to their use."
|
||||||
|
button = "I Accept"
|
||||||
|
|
||||||
|
######################## sidebar widgets #########################
|
||||||
|
[widgets]
|
||||||
|
sidebar = ["categories", "tags"]
|
||||||
|
|
||||||
|
|
||||||
|
# google map
|
||||||
|
[google_map]
|
||||||
|
enable = false
|
||||||
|
map_api_key = "AIzaSyCcABaamniA6OL5YvYSpB3pFMNrXwXnLwU"
|
||||||
|
map_latitude = "51.5223477"
|
||||||
|
map_longitude = "-0.1622023"
|
||||||
|
map_marker = "images/marker.png"
|
||||||
|
|
||||||
|
|
||||||
|
# Subscription
|
||||||
|
[subscription]
|
||||||
|
enable = false
|
||||||
|
# mailchimp subsciption
|
||||||
|
mailchimp_form_action = "https://gmail.us4.list-manage.com/subscribe/post?u=463ee871f45d2d93748e77cad&id=a0a2c6d074" # replace this url with yours
|
||||||
|
mailchimp_form_name = "b_463ee871f45d2d93748e77cad_a0a2c6d074"
|
7
src/content/index.md
Normal file
7
src/content/index.md
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
+++
|
||||||
|
title = 'Hello'
|
||||||
|
date = 2024-10-08T12:54:19+02:00
|
||||||
|
draft = true
|
||||||
|
+++
|
||||||
|
|
||||||
|
Hello world
|
5
src/hugo.toml
Normal file
5
src/hugo.toml
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
baseURL = "/"
|
||||||
|
title = "Fediversity"
|
||||||
|
languageCode = 'en-gb'
|
||||||
|
timeZone = "Europe/Amsterdam"
|
||||||
|
disableKinds = ["taxonomy"]
|
Reference in a new issue