docs: Support GFM style admonitions in option descriptions

This commit is contained in:
Quentin Boyer 2024-09-11 00:08:51 +02:00 committed by Matt Sturgeon
parent cab2a30ae1
commit 8eab77b51b
No known key found for this signature in database
GPG key ID: 4F91844CED1A8299
5 changed files with 129 additions and 5 deletions

View file

@ -28,11 +28,18 @@ let
lib = prev.lib.extend libOverlay;
nixos-render-docs = prev.nixos-render-docs.overrideAttrs (old: {
propagatedBuildInputs = old.propagatedBuildInputs ++ [
(final.python3.pkgs.callPackage ./gfm-alerts-to-admonitions {
# Use the same override as `nixos-render-docs` does, to avoid "duplicate dependency" errors
markdown-it-py = final.python3.pkgs.markdown-it-py.overridePythonAttrs { doCheck = false; };
})
];
patches = old.patches or [ ] ++ [
# Adds support for GFM-style admonitions in rendered commonmark
./0001-Output-GFM-admonition.patch
# TODO:add support for _parsing_ GFM admonitions too
# https://github.com/nix-community/nixvim/issues/2217
./0001-nixos-render-docs-Output-GFM-admonition.patch
# Adds support for parsing GFM-style admonitions
./0002-nixos-render-docs-Support-gfm-style-admonitions.patch
];
});
};