summary refs log tree commit diff stats
path: root/doc/docgen.rst
diff options
context:
space:
mode:
authorTimothee Cour <timothee.cour2@gmail.com>2020-05-25 04:25:40 -0700
committerGitHub <noreply@github.com>2020-05-25 13:25:40 +0200
commit58282547f6d3fe4ce3fa2efe4f6afe07bc5de662 (patch)
tree2ef8bc28fa8d78ea8bc18505c00d178a10537da4 /doc/docgen.rst
parentcbfe9325c5c1851630ce10cf780d1af27c57d19a (diff)
downloadNim-58282547f6d3fe4ce3fa2efe4f6afe07bc5de662.tar.gz
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
Diffstat (limited to 'doc/docgen.rst')
-rw-r--r--doc/docgen.rst12
1 files changed, 10 insertions, 2 deletions
diff --git a/doc/docgen.rst b/doc/docgen.rst
index e7e5e71cc..24743ba13 100644
--- a/doc/docgen.rst
+++ b/doc/docgen.rst
@@ -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