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

Generate documentation from JSON output #1180

Closed
jonsage opened this issue Jan 16, 2020 · 9 comments
Closed

Generate documentation from JSON output #1180

jonsage opened this issue Jan 16, 2020 · 9 comments
Labels
enhancement Improved functionality
Milestone

Comments

@jonsage
Copy link

jonsage commented Jan 16, 2020

JSON file could also be used as the input for Typedoc

Typedoc can output a JSON file containing all the reflection data instead of creating the HTML (or other format) documentation. It would good if this JSON file could also be used as the input for Typedoc and the HTML (or other format) documentation generated from that JSON.

Problem

I work with a documentation portal, and I do not have access to the TypeScript code itself, just the exported reflection data (JSON). I'd like to process this into documentation and manage the templates/theming within my side of things.

Suggested Solution

Allow Typedoc JSON format refelection data to be used as input for the Typedoc tool.

@Gerrit0 Gerrit0 added the enhancement Improved functionality label Jan 17, 2020
@Gerrit0
Copy link
Collaborator

Gerrit0 commented Jan 17, 2020

This would be a neat bit of functionality to support. I think we should eventually be able to do this... it's a ways off though. Some information in the reflections isn't reflected in the JSON output. (Mainly cross references, I think all the type information is present)

@Gerrit0 Gerrit0 added this to the 1.0.0 milestone Mar 22, 2020
@Gerrit0 Gerrit0 removed this from the 1.0.0 milestone Nov 2, 2020
@raygesualdo
Copy link

Some information in the reflections isn't reflected in the JSON output.

Can you expound on this @Gerrit0? I was planning on using the JSON output to build a simple markdown doc for some internal Typescript libraries we use.

@Gerrit0
Copy link
Collaborator

Gerrit0 commented Feb 3, 2021

I think with 0.20 we're a lot closer to being able to do this in TypeDoc itself. Missing items I can think of initially:

  • files / directories on ProjectReflection - I want to remove these anyways. We build them up but don't really use it for anything, and AFAIK no plugin does either.
  • url, anchor, hasOwnDocument, cssClasses on Reflection - these are all inappropriately placed anyways, they shouldn't live on the reflections.

... and that's all I can think of right now, which means this is actually a lot closer to being possible than I thought it was. It might be one of the goals of 0.22 since 0.21 is going to clean up both of these.

This shouldn't stop you from using the JSON output today. This request is for TypeDoc being able to be re-run on JSON produced from a prior run. It's certainly possible to generate docs with a different tool from the json already.

@raygesualdo
Copy link

Thanks for the clarification!

@jankuca
Copy link

jankuca commented Mar 4, 2021

This would be a killer feature.

@sancarn
Copy link

sancarn commented Sep 7, 2022

TypeDoc sites look amazing too, the way I see it, this feature could see TypeDoc site used in other typed languages (as long as they can convert the AST type data to JSON)

@divya-gariga
Copy link

Now using Typedoc, can we generate documentation in HTML format using JSON output?

@Gerrit0 Gerrit0 added this to the v0.24 milestone Mar 11, 2023
@Gerrit0
Copy link
Collaborator

Gerrit0 commented Apr 8, 2023

v0.24.0 has released with support for this, the relevant option is --entryPointStrategy merge, which can take multiple previously created JSON output files and generate documentation from them.

@Gerrit0 Gerrit0 closed this as completed Apr 8, 2023
@Dayday10
Copy link

Dayday10 commented Apr 8, 2023

Nice

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improved functionality
Projects
None yet
Development

No branches or pull requests

7 participants