This repository has been archived on 2024-11-13. You can view files and clone it, but cannot push or open issues or pull requests.
fediversity.eu/content/default.nix
Valentin Gagarin ad1e193067 set a default location for documents
it turns out that setting a value appends to that.
the default only needs to be overridden when the symbolic name of the
document changes. while there's a chance people will inadvertently break
links that way, it's requires less up-front knowledge to work with.
2024-11-13 15:24:41 +01:00

54 lines
1.3 KiB
Nix

{ config, lib, ... }:
let
inherit (config) pages;
in
{
imports = lib.nixFiles ./.;
collections.news.type = config.content-types.article;
pages.index = { link, ... }: {
title = "Fediversity";
description = "Fediversity web site";
summary = ''
This web site hosts up-to-date information about the the NGI Zero Fediversity project.
'';
body = ''
# Welcome to the Fediversity project
${pages.fediversity.summary}
[Learn more about Fediversity](${link pages.fediversity})
# Fediversity grants
${pages.grants.summary}
[Learn more about Fediversity grants](${link pages.grants})
# Consortium
The Consortium behind the Fediversity project is a cooperation between NLnet, Open Internet Discourse Foundation, NORDUnet and Tweag.
${toString (map (partner: ''
## ${partner.title}
${partner.description}
[Read more about ${partner.title}](${link partner})
'') (with pages; [ nlnet oid tweag nordunet ]))}
# News
${
let
sorted = with lib; reverseList (sortOn (entry: entry.date) config.collections.news.entry);
in
lib.join "\n" (map (article: ''
- ${article.date} [${article.title}](${article})
'') sorted)
}
'';
};
}