I’m working on an Electron project, and I can generate JSON for my code using JSDoc:

jsdoc -X > data.json

I want to use this JSON output to create a live, searchable documentation site similar to DevDocs. By that I mean:

  • Typing something like get_ should instantly filter and list all matching functions, classes, or variables.

  • Users should be able to click a symbol and navigate to its detailed documentation.

  • The site should display which module or file each symbol belongs to.

  • Search and navigation should happen entirely on the client side, without page reloads.

I’m looking for guidance on:

How to use JSON generated from source code to build a documentation site with searchable, navigable content.

I’m happy to consider alternatives to JSDoc, and I’m also open to any existing tools or frameworks that can help me achieve this goal.

5 Replies 5

Based on their documentation it looks like the default is to output as HTML, but the -x makes it output as JSON to the console instead. I think if you use the normal output you can then upload that somewhere like S3 as a static site, and it should be pretty much what you're looking for.

P.S. The default output folder is ./out, but you can specify a different folder if you wish using -d

I choose the option for `Advice`. Now not sure if someone can answer. Can you check whether you have option to answer, or is it just comments?

It seems to be just comments as far as I can tell... Did running jsdoc without -x not provide you with useable HTML?

i get html, but it is not standard. for example it does not have interactive search.

I think i can use docdash or ramda documentation page theme for JSDoc.

Your Reply

By clicking “Post Your Reply”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.