golds
golds copied to clipboard
How to generate docs for project only?
How to restrict golds
to generate the HTML docs for just the current project?
$ ls -Altr
total 96
-rw-r--r-- 1 user wheel 22B Dec 30 15:17 .gitignore
-rw-r--r-- 1 user wheel 1.1K Dec 30 15:17 LICENSE
-rw-r--r-- 1 user wheel 10K Dec 30 15:17 README.md
-rw-r--r-- 1 user wheel 12K Dec 30 15:17 TODO.md
drwxr-xr-x 8 user wheel 256B Dec 30 15:17 code/
-rw-r--r-- 1 user wheel 126B Dec 30 15:17 go.mod
-rw-r--r-- 1 user wheel 2.7K Dec 30 15:17 go.sum
drwxr-xr-x 3 user wheel 96B Dec 30 15:17 gocore/
drwxr-xr-x 3 user wheel 96B Dec 30 15:17 godoge/
drwxr-xr-x 3 user wheel 96B Dec 30 15:17 gold/
drwxr-xr-x 6 user wheel 192B Dec 30 15:17 internal/
-rw-r--r-- 1 user wheel 85B Dec 30 15:17 main.go
drwxr-xr-x 12 user wheel 384B Dec 30 15:17 .git/
$ golds -emphasize-wdpkgs -compact -gen -dir=.generated .
...

It is easy to only show docs of the current project only (without dependency package docs) in the starting page.
If you mean to avoid generating docs of the dependency packages totally, there are some difficulties to achieve this. I'm not sure if this is possible now. I will take this to heart until I find a solution.
Thanks, @go101! The latter is what I had in mind (to match what javadoc
/ jsdoc
typically does). Not urgent, just thought of checking to see if it was possible / supported.
It is easy to only show docs of the current project only (without dependency package docs) in the starting page.
How to do this? I'm totally Ok to generate the documentation for all dependencies, but I would like to see only the documentation of project only on main page
A new option -wdpkgs-display=promoted|solo|general
will be added in the next version. The old option -emphasize-wdpkgs
will be replaced with -wdpkgs-display=promoted
. And -wdpkgs-display=solo
is used to show docs of packages in the current directory.
Thanks!
A -wdpkgs-listing=promoted|solo|general
option is added in v0.1.8.
Can the imported packages be removed if --wdpkgs-listing
is set to solo
? I have a very simple project whose documentation takes a couple kilobytes but golds generates an 80MB monstrosity which includes the entire standard library.
@vultbot
You can add --compact
option to reduce the size. About more options, please read https://go101.org/apps-and-libs/golds.html