TypeStrong / typedoc

Documentation generator for TypeScript projects.
https://typedoc.org
Apache License 2.0
7.7k stars 697 forks source link

Showcase different themes #1005

Closed resistdesign closed 3 years ago

resistdesign commented 5 years ago

Problem

I'm not sure what this outputs based on what I see at the website or this repo.

Suggested Solution

It would be good to have an examples or showcase section on the website.

resistdesign commented 5 years ago

bitmoji

aciccarello commented 5 years ago

Thanks for the feedback. Could you be a little more descriptive? We already have the API docs. What different pieces would you like to see examples of?

giannif commented 5 years ago

@aciccarello is there a showcase of themes? I just found typedoc today, and am wondering if there are themes besides minimal and default that perhaps change the colors. I randomly tried two themes locally (typedoc-clarity-theme, typedoc-twilio-theme), but they didn't seem to do anything, so I'm confused. Would appreciate any guidance

Gerrit0 commented 5 years ago

@giannif just installing the theme won't change anything, you need to pass the theme path with the --theme option to use themes.

resistdesign commented 5 years ago

@aciccarello Yeah, I thought there might be some themes and just was thinking there would be an example section like you might find on other sites for projects like this.

giannif commented 5 years ago

@Gerrit0 yeah, that's what I meant, using the --theme option does nothing with custom themes. I found this theme, which is a nice, obvious dark theme, and I see no changes.

Using minimal works

typedoc --theme minimal --out docs/ ./src

These do nothing:

typedoc --theme ./node_modules/typedoc-thunder-theme/bin --out docs/ ./src
typedoc --theme ./node_modules/typedoc-twilio-theme/bin --out docs/ ./src
typedoc --theme ./node_modules/typedoc-clarity-theme/bin --out docs/ ./src

The output is always the same:


Using TypeScript 3.2.4 from /Users/MyProject/node_modules/typedoc/node_modules/typescript/lib
Rendering [========================================] 100%

Documentation generated at /Users/MyProject/docs
Gerrit0 commented 5 years ago

I haven't looked at all the themes you linked, but the vortex theme has both a default and a minimal theme included in it. You can use it like this:

typedoc --theme ./node_modules/typedoc-vortex-theme/bin/default ./src
# or
typedoc --theme ./node_modules/typedoc-vortex-theme/bin/minimal ./src

The other themes likely have the same structure, so you need to append /minimal or /default.

giannif commented 5 years ago

@Gerrit0 whoa! yes that works. amazing!

Okay, so vortex does not throw an error with /bin, which threw me off there.

clarity and twilio only compile with /bin, but I can't tell if the theme was actually applied since there are no visual changes, or it works just like vortex does with /bin which is compiling successfully but not using the theme.

Overall, a bit confusing

Update: https://github.com/ryan-rowland/typedoc-clarity-theme theme does nothing but hide private vars (which you can do with --excludePrivate), so maybe that theme worked and I just didn't notice

Anyway, I drifted off topic slightly, but a showcase of themes would have helped me for sure, and I'm still not sure where to look for themes

aciccarello commented 5 years ago

Could add this theme as well https://github.com/pirix-gh/eledoc

Gerrit0 commented 3 years ago

I've considered doing this a couple times, and ended up coming to the conclusion that this is not something I want to maintain. Adding this would mean that every time we do a release I have to manually confirm that the output of the themes in the showcase is valid (just because it ran doesn't mean that the output is right)