Autogenerated Javascript documention of all modules/functions etc available in Nuclei Javascript Protocol
Generate/Update HTML Docs
Install clean-jsdoc-theme
refer docs for more details or install using below command
$ npm install -g clean-jsdoc-theme
Install jsdoc
refer docs for more details or install using below command
Locate clean-jsdoc-theme
directory
Its usually located at $(npm root -g)/clean-jsdoc-theme
when installed globally
Clone target nuclei repo and navigate to desired branch
$ gh repo clone projectdiscovery/nuclei
Generate docs
$ jsdoc -R nuclei/docs/template-guide/javascript.mdx -r -d docs/ -t $(npm root -g)/clean-jsdoc-theme nuclei/v2/pkg/js/generated/js
If above command fails, try updating paths Here's expected command
jsdoc -R [Homepage.md] -r -d api_reference -t [optional: jsdoc theme to use] generated/js
Verify generated docs
$ cd docs && simplehttpserver
Contributing
If you want to update / fix something in docs etc . Please update docs present at https://github.com/projectdiscovery/nuclei/tree/main/v2/pkg/js/generated/js and then follow above steps to generate docs and create a PR with updated docs.