mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-20 16:15:43 +02:00
docs: include function docs
Embed the function reference docs into the main docs website.
This commit is contained in:
parent
dfaea5982e
commit
1c6dd6579a
3 changed files with 16 additions and 1 deletions
|
@ -127,7 +127,7 @@ lib.fix (
|
|||
# > sandbox-exec: pattern serialization length 69298 exceeds maximum (65535)
|
||||
docs = pkgs.callPackage ./mdbook {
|
||||
inherit evaledModules transformOptions;
|
||||
inherit (self) search;
|
||||
inherit (self) search lib-docs;
|
||||
};
|
||||
}
|
||||
)
|
||||
|
|
|
@ -10,6 +10,10 @@
|
|||
- [Configuration examples](./user-guide/config-examples.md)
|
||||
- [Lazy Loading](./user-guide/lazy-loading.md)
|
||||
|
||||
# Functions
|
||||
|
||||
@FUNCTIONS_MENU@
|
||||
|
||||
# Platforms
|
||||
|
||||
- [Nixvim Platforms](./platforms/index.md)
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
nixosOptionsDoc,
|
||||
transformOptions,
|
||||
search,
|
||||
lib-docs,
|
||||
# The root directory of the site
|
||||
baseHref ? "/",
|
||||
# A list of all available docs that should be linked to
|
||||
|
@ -359,6 +360,13 @@ pkgs.stdenv.mkDerivation (finalAttrs: {
|
|||
# Copy the contributing file
|
||||
cp $contributing ./CONTRIBUTING.md
|
||||
|
||||
# Symlink the function docs
|
||||
for path in ${lib-docs}/*
|
||||
do
|
||||
echo "symlinking \"$path\" to \"$(basename "$path")\""
|
||||
ln -s "$path" $(basename "$path")
|
||||
done
|
||||
|
||||
# Copy the generated MD docs into the build directory
|
||||
bash -e ${finalAttrs.passthru.copy-docs}
|
||||
|
||||
|
@ -375,6 +383,7 @@ pkgs.stdenv.mkDerivation (finalAttrs: {
|
|||
|
||||
# Patch SUMMARY.md - which defiens mdBook's table of contents
|
||||
substituteInPlace ./SUMMARY.md \
|
||||
--replace-fail "@FUNCTIONS_MENU@" "$functionsSummary" \
|
||||
--replace-fail "@PLATFORM_OPTIONS@" "$wrapperOptionsSummary" \
|
||||
--replace-fail "@NIXVIM_OPTIONS@" "$nixvimOptionsSummary"
|
||||
|
||||
|
@ -401,6 +410,8 @@ pkgs.stdenv.mkDerivation (finalAttrs: {
|
|||
wrapperOptionsFiles
|
||||
;
|
||||
|
||||
functionsSummary = lib-docs.menu;
|
||||
|
||||
passthru = {
|
||||
fix-links = callPackage ../fix-links {
|
||||
# FIXME: determine values from availableVersions & baseHref
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue