mirror of
https://github.com/nim-lang/Nim.git
synced 2026-04-22 23:35:22 +00:00
fix #6583, fix #14376, index+search now generated for all projects, many bug fixes with nim doc (#14324)
* refs #6583 fix nim doc output * changelog * change default for outDir when unspecified * cleanups * --project implies --index
This commit is contained in:
@@ -30,8 +30,16 @@ Generate HTML documentation for a whole project:
|
||||
|
||||
::
|
||||
# delete any htmldocs/*.idx file before starting
|
||||
nim doc --project --index:on --git.url:<url> --git.commit:<tag> <main_filename>.nim
|
||||
nim buildIndex -o:htmldocs/theindex.html htmldocs
|
||||
nim doc --project --index:on --git.url:<url> --git.commit:<tag> --outdir:htmldocs <main_filename>.nim
|
||||
# this will generate html files, a theindex.html index, css and js under `htmldocs`
|
||||
# See also `--docroot` to specify a relative root.
|
||||
# to get search (dochacks.js) to work locally, you need a server otherwise
|
||||
# CORS will prevent opening file:// urls; this works:
|
||||
python3 -m http.server 7029 --directory htmldocs
|
||||
# When --outdir is omitted it defaults to $projectPath/htmldocs,
|
||||
or `$nimcache/htmldocs` with `--usenimcache` which avoids clobbering your sources;
|
||||
and likewise without `--project`.
|
||||
Adding `-r` will open in a browser directly.
|
||||
|
||||
|
||||
Documentation Comments
|
||||
|
||||
Reference in New Issue
Block a user