mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-21 00:25:42 +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)
|
# > sandbox-exec: pattern serialization length 69298 exceeds maximum (65535)
|
||||||
docs = pkgs.callPackage ./mdbook {
|
docs = pkgs.callPackage ./mdbook {
|
||||||
inherit evaledModules transformOptions;
|
inherit evaledModules transformOptions;
|
||||||
inherit (self) search;
|
inherit (self) search lib-docs;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
|
@ -10,6 +10,10 @@
|
||||||
- [Configuration examples](./user-guide/config-examples.md)
|
- [Configuration examples](./user-guide/config-examples.md)
|
||||||
- [Lazy Loading](./user-guide/lazy-loading.md)
|
- [Lazy Loading](./user-guide/lazy-loading.md)
|
||||||
|
|
||||||
|
# Functions
|
||||||
|
|
||||||
|
@FUNCTIONS_MENU@
|
||||||
|
|
||||||
# Platforms
|
# Platforms
|
||||||
|
|
||||||
- [Nixvim Platforms](./platforms/index.md)
|
- [Nixvim Platforms](./platforms/index.md)
|
||||||
|
|
|
@ -7,6 +7,7 @@
|
||||||
nixosOptionsDoc,
|
nixosOptionsDoc,
|
||||||
transformOptions,
|
transformOptions,
|
||||||
search,
|
search,
|
||||||
|
lib-docs,
|
||||||
# The root directory of the site
|
# The root directory of the site
|
||||||
baseHref ? "/",
|
baseHref ? "/",
|
||||||
# A list of all available docs that should be linked to
|
# A list of all available docs that should be linked to
|
||||||
|
@ -359,6 +360,13 @@ pkgs.stdenv.mkDerivation (finalAttrs: {
|
||||||
# Copy the contributing file
|
# Copy the contributing file
|
||||||
cp $contributing ./CONTRIBUTING.md
|
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
|
# Copy the generated MD docs into the build directory
|
||||||
bash -e ${finalAttrs.passthru.copy-docs}
|
bash -e ${finalAttrs.passthru.copy-docs}
|
||||||
|
|
||||||
|
@ -375,6 +383,7 @@ pkgs.stdenv.mkDerivation (finalAttrs: {
|
||||||
|
|
||||||
# Patch SUMMARY.md - which defiens mdBook's table of contents
|
# Patch SUMMARY.md - which defiens mdBook's table of contents
|
||||||
substituteInPlace ./SUMMARY.md \
|
substituteInPlace ./SUMMARY.md \
|
||||||
|
--replace-fail "@FUNCTIONS_MENU@" "$functionsSummary" \
|
||||||
--replace-fail "@PLATFORM_OPTIONS@" "$wrapperOptionsSummary" \
|
--replace-fail "@PLATFORM_OPTIONS@" "$wrapperOptionsSummary" \
|
||||||
--replace-fail "@NIXVIM_OPTIONS@" "$nixvimOptionsSummary"
|
--replace-fail "@NIXVIM_OPTIONS@" "$nixvimOptionsSummary"
|
||||||
|
|
||||||
|
@ -401,6 +410,8 @@ pkgs.stdenv.mkDerivation (finalAttrs: {
|
||||||
wrapperOptionsFiles
|
wrapperOptionsFiles
|
||||||
;
|
;
|
||||||
|
|
||||||
|
functionsSummary = lib-docs.menu;
|
||||||
|
|
||||||
passthru = {
|
passthru = {
|
||||||
fix-links = callPackage ../fix-links {
|
fix-links = callPackage ../fix-links {
|
||||||
# FIXME: determine values from availableVersions & baseHref
|
# FIXME: determine values from availableVersions & baseHref
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue