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

57 lines
1.4 KiB
Nix
Raw Normal View History

2024-11-13 15:24:41 +01:00
{ config, lib, ... }:
2024-11-13 15:24:40 +01:00
let
inherit (config) pages;
in
{
imports = with lib.fileset; toList (difference (fileFilter ({ hasExt, ... }: hasExt "nix") ./.) ./default.nix);
2024-11-13 15:24:40 +01:00
2024-11-13 15:24:41 +01:00
collections.news.type = config.content-types.article;
pages.index = { link, ... }: {
2024-11-13 15:24:40 +01:00
title = "Fediversity";
locations = [
"index.html"
];
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
2024-11-13 15:24:40 +01:00
${pages.fediversity.summary}
[Learn more about Fediversity](${link pages.fediversity})
2024-11-13 15:24:40 +01:00
2024-11-13 15:24:40 +01:00
# Fediversity grants
${pages.grants.summary}
[Learn more about Fediversity grants](${link pages.grants})
2024-11-13 15:24:40 +01:00
# 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})
2024-11-13 15:24:40 +01:00
'') (with pages; [ nlnet oid tweag nordunet ]))}
2024-11-13 15:24:41 +01:00
# News
2024-11-13 15:24:41 +01:00
${
let
sorted = with lib; reverseList (sortOn (entry: entry.date) config.collections.news.entry);
in
lib.join "\n" (map (article: ''
2024-11-13 15:24:41 +01:00
- ${article.date} [${article.title}](${article})
2024-11-13 15:24:41 +01:00
'') sorted)
}
2024-11-13 15:24:40 +01:00
'';
};
}