Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 16 additions & 2 deletions overview/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -148,11 +148,25 @@ let
'';
};

subgrants = rec {
one = subgrant: ''
<li>
<https://nlnet.nl/project/${subgrant}>
</li>
'';
many =
subgrants:
optionalString (subgrants != [ ]) ''
<ul>
${concatLines (map one subgrants)}
</ul>
'';
};

projects = {
one = name: project: ''
${heading 1 name}
<https://nlnet.nl/project/${name}>

${render.subgrants.many (project.metadata.subgrants or [ ])}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it be feasible to fall back to using <https://nlnet.nl/project/${name}> if project.metadata.subgrants doesn't exist? As such, we won't break the links for the old projects.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's okay to break it temporarily (since it's a partial break) and in one of the next steps to invert the compatibility wrapper so //projects-old are converted to the new format.

${render.packages.many (pick.packages project)}
${render.options.many (pick.options project)}
${render.examples.many (pick.examples project)}
Expand Down