Skip to content

Commit

Permalink
Merge pull request #48 from isabelroses/feat/docs/githublinks
Browse files Browse the repository at this point in the history
feat(docs): link to github rather then the nix store
  • Loading branch information
oddlama authored Nov 19, 2024
2 parents 82dbbdc + c4b43c3 commit 9fb87bc
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions pkgs/docs.nix
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,26 @@
})
options
;
transformOptions = opt:
opt
// {
declarations =
map (
decl:
if lib.hasPrefix (toString ../.) (toString decl)
then
gitHubDeclaration (
lib.removePrefix "/" (lib.removePrefix (toString ../.) (toString decl))
)
else decl
)
opt.declarations;
};
};

gitHubDeclaration = subpath: {
url = "https://github.com/oddlama/nix-topology/blob/main/${subpath}";
name = "<${subpath}>";
};

flakeForExample = path: let
Expand Down

0 comments on commit 9fb87bc

Please sign in to comment.