12.nixvim/docs/lib/pages.nix
Matt Sturgeon 91df3d9f91 docs/modules: model page content as sections
Represent page content as a list of typed sections, rather than a fixed
set of page attributes.

This allows pages to be composed from multiple content sources while
simplifying the rendering logic and prepares the new docs system for
additional section types such as option documentation.
2026-06-23 01:04:32 +00:00

40 lines
1 KiB
Nix

# This file contains a list of function reference docs pages that should be generated by `nixdoc`
#
# Note: `nixdoc` uses `rnix` to parse the input file, so the file must return a fairly simple attrset.
# If there is an issue parsing the file, the resulting markdown will not contain any function docs.
{
functions = {
_category.name = "Functions";
lib.nixvim = {
_page = {
title = "lib.nixvim: Nixvim's functions";
content = [
./index.md
];
};
modules._page = {
title = "lib.nixvim.modules: module functions";
content = [
{ functions.file = ../../lib/modules.nix; }
];
};
utils._page = {
title = "lib.nixvim.utils: utility functions";
content = [
{ functions.file = ../../lib/utils.nix; }
];
};
lua._page = {
title = "lib.nixvim.lua: lua functions";
content = [
{ functions.file = ../../lib/to-lua.nix; }
];
};
};
};
}