Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to generate docs for project only? #9

Open
indrasvat opened this issue Dec 30, 2020 · 8 comments
Open

How to generate docs for project only? #9

indrasvat opened this issue Dec 30, 2020 · 8 comments
Labels
feature request question Further information is requested

Comments

@indrasvat
Copy link

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 .
...

golds-docs

@zigo101
Copy link
Collaborator

zigo101 commented Dec 31, 2020

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.

@indrasvat
Copy link
Author

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.

@SVilgelm
Copy link

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

@zigo101
Copy link
Collaborator

zigo101 commented Jan 14, 2021

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.

@SVilgelm
Copy link

Thanks!

zigo101 added a commit that referenced this issue Jan 17, 2021
add a "wdpkgs-listing" cli option for #9 (comment)
@zigo101
Copy link
Collaborator

zigo101 commented Jan 17, 2021

A -wdpkgs-listing=promoted|solo|general option is added in v0.1.8.

@zigo101 zigo101 added question Further information is requested feature request labels May 25, 2021
@vultbot
Copy link

vultbot commented Jul 13, 2022

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.

@zigo101
Copy link
Collaborator

zigo101 commented Jul 14, 2022

@vultbot
You can add --compact option to reduce the size. About more options, please read https://go101.org/apps-and-libs/golds.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request question Further information is requested
Projects
None yet
Development

No branches or pull requests

4 participants