From 58282547f6d3fe4ce3fa2efe4f6afe07bc5de662 Mon Sep 17 00:00:00 2001 From: Timothee Cour Date: Mon, 25 May 2020 04:25:40 -0700 Subject: 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 --- doc/docgen.rst | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'doc/docgen.rst') 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: --git.commit: .nim - nim buildIndex -o:htmldocs/theindex.html htmldocs + nim doc --project --index:on --git.url: --git.commit: --outdir:htmldocs .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 -- cgit 1.4.1-2-gfad0