summary refs log tree commit diff stats
path: root/doc/docgen.rst
diff options
context:
space:
mode:
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