forked from nix-community/nixvim
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: Add basic documentation system based on nmd
You can now run `nix build '.#docs'` to build HTML documentation documenting every single option on nixvim! Fortunately, thanks to the 'description' field, most options are already documented, but there are still a fair few that need documenting. I will be taking care of those in the next few days. When those are done, I will find a way to automatically rebuild documentation on every repo push, and also add a PR hook requiring documentation. Additionally, I will try to find a way to have per-page plugin docs.
- Loading branch information
Showing
42 changed files
with
184 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
.tmp | ||
result |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
{ pkgs, lib, ... }: | ||
let | ||
nmdSrc = pkgs.fetchFromGitLab { | ||
name = "nmd"; | ||
owner = "rycee"; | ||
repo = "nmd"; | ||
rev = "527245ff605bde88c2dd2ddae21c6479bb7cf8aa"; | ||
sha256 = "1zi0f9y3wq4bpslx1py3sfgrgd9av41ahpandvs6rvkpisfsqqlp"; | ||
}; | ||
nmd = import nmdSrc { inherit pkgs lib; }; | ||
scrubbedPkgsModule = { | ||
imports = [{ | ||
_module.args = { | ||
pkgs = lib.mkForce (nmd.scrubDerivations "pkgs" pkgs); | ||
pkgs_i686 = lib.mkForce { }; | ||
}; | ||
}]; | ||
}; | ||
buildModulesDocs = args: | ||
nmd.buildModulesDocs ({ | ||
moduleRootPaths = [ ./.. ]; | ||
mkModuleUrl = path: | ||
"https://github.com/pta2002/nixvim/blob/master/${path}#blob-path"; | ||
channelName = "nixvim"; | ||
} // args); | ||
nixvimDocs = buildModulesDocs { | ||
modules = [ | ||
(import ../nixvim.nix {}) | ||
scrubbedPkgsModule | ||
]; | ||
docBook.id = "nixvim-options"; | ||
}; | ||
|
||
docs = nmd.buildDocBookDocs { | ||
pathName = ""; | ||
modulesDocs = [ nixvimDocs ]; | ||
documentsDirectory = ./.; | ||
documentType = "book"; | ||
chunkToc = '' | ||
<toc> | ||
<d:tocentry xmlns:d="http://docbook.org/ns/docbook" linkend="book-home-manager-manual"><?dbhtml filename="index.html"?> | ||
<d:tocentry linkend="ch-options"><?dbhtml filename="options.html"?></d:tocentry> | ||
<d:tocentry linkend="ch-nixos-options"><?dbhtml filename="nixos-options.html"?></d:tocentry> | ||
<d:tocentry linkend="ch-nix-darwin-options"><?dbhtml filename="nix-darwin-options.html"?></d:tocentry> | ||
<d:tocentry linkend="ch-tools"><?dbhtml filename="tools.html"?></d:tocentry> | ||
<d:tocentry linkend="ch-release-notes"><?dbhtml filename="release-notes.html"?></d:tocentry> | ||
</d:tocentry> | ||
</toc> | ||
''; | ||
}; | ||
in docs.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<refentry xmlns="http://docbook.org/ns/docbook" | ||
xmlns:xlink="http://www.w3.org/1999/xlink" | ||
xmlns:xi="http://www.w3.org/2001/XInclude"> | ||
<refmeta> | ||
<refentrytitle><filename>nixvim.nix</filename></refentrytitle> | ||
<manvolnum>5</manvolnum> | ||
<refmiscinfo class="source">NixVim</refmiscinfo> | ||
<!-- <refmiscinfo class="version"><xi:include href="version.txt" parse="text"/></refmiscinfo> --> | ||
</refmeta> | ||
<refnamediv> | ||
<refname><filename>nixvim.nix</filename></refname> | ||
<refpurpose>NixVim configuration specification</refpurpose> | ||
</refnamediv> | ||
<refsection> | ||
<title>Description</title> | ||
<para> | ||
TODO | ||
</para> | ||
</refsection> | ||
<refsection> | ||
<title>Options</title> | ||
<para> | ||
You can use the following options in your nixvim config | ||
</para> | ||
<xi:include href="./nmd-result/nixvim-options.xml" /> | ||
</refsection> | ||
</refentry> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<reference xmlns="http://docbook.org/ns/docbook" | ||
xmlns:xlink="http://www.w3.org/1999/xlink" | ||
xmlns:xi="http://www.w3.org/2001/XInclude"> | ||
<title>NixVim Reference Pages</title> | ||
<info> | ||
<author><personname>NixVim contributors</personname></author> | ||
<copyright><year>2021-2022</year><holder>NixVim contributors</holder> | ||
</copyright> | ||
</info> | ||
<xi:include href="man-nixvim.xml" /> | ||
</reference> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<book xmlns="http://docbook.org/ns/docbook" | ||
xmlns:xlink="http://www.w3.org/1999/xlink" | ||
xmlns:xi="http://www.w3.org/2001/XInclude" | ||
version="5.0" | ||
xml:id="book-home-manager-manual"> | ||
<info> | ||
<title>NixVim Manual</title> | ||
</info> | ||
<preface> | ||
<title>Preface</title> | ||
<para> | ||
This manual is meant to serve as the ultimate reference for how to use and install NixVim. | ||
</para> | ||
<para> | ||
If you have any issues, questions, or plugin suggestions please open an issue on the | ||
<link xlink:href="https://github.com/pta2002/nixvim">NixVim GitHub</link> | ||
</para> | ||
</preface> | ||
<appendix xml:id="ch-options"> | ||
<title>Configuration Options</title> | ||
<xi:include href="./nmd-result/nixvim-options.xml" /> | ||
</appendix> | ||
</book> |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters