From 5c9b98e64d8384553452192a6bebdb1e4e81b907 Mon Sep 17 00:00:00 2001 From: Matt Sturgeon Date: Thu, 13 Jun 2024 05:31:31 +0100 Subject: [PATCH] docs: render maintainers with github links If a maintainer has their github defined, render their name as a link to their github profile. --- docs/mdbook/default.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/mdbook/default.nix b/docs/mdbook/default.nix index d47aeece..1a4c8424 100644 --- a/docs/mdbook/default.nix +++ b/docs/mdbook/default.nix @@ -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