docs: render maintainers with github links

If a maintainer has their github defined, render their name as a link to
their github profile.
This commit is contained in:
Matt Sturgeon 2024-06-13 05:31:31 +01:00
parent cc9023fb1d
commit 5c9b98e64d
No known key found for this signature in database
GPG key ID: 4F91844CED1A8299

View file

@ -70,7 +70,8 @@ let
let
info = optionalAttrs (hasAttrByPath path nixvimInfo) (getAttrFromPath path nixvimInfo);
maintainers = lib.unique (options.config.meta.maintainers.${info.file} or [ ]);
maintainersNames = builtins.map (m: m.name) maintainers;
maintainersNames = builtins.map maintToMD maintainers;
maintToMD = m: if m ? github then "[${m.name}](https://github.com/${m.github})" else m.name;
in
# Make sure this path has a valid info attrset
if info ? file && info ? description && info ? url then