Skip to content

How the documentation is generated

DigitalBox98 edited this page May 1, 2024 · 4 revisions

Initial creation

The original/commented files are inside the docs/synoappsdocs-source.tar.gz file. JSduck is required to generate the documentation

Install jsduck 2.7.6: follow the guide on https://gist.github.com/defaye/47aa2ca29b17e8ec6315c0bc3118abcf

sudo $HOME/.rbenv/versions/2.7.6/bin/gem install jsduck

Check install :

jsduck --version

To generate the apps documentation, the steps are as below :

tar -xvf synoappsdocs-source.tar.gz
cd SynoApps
jsduck 3rdparty/ modules/ --output docs --welcome=welcome_page.html --guides=guides.json

How the documentation is enriched

The steps to enrich the API documentation is as below :

  • Add comments for the desired 3rdparty/module component in the corresponding source file
  • Follow the next steps described in "how the documentation is generated"

That's it !

Below is an example of comments added which will be used during the documentation generation :

/**
 * @class SYNO.SDS.VideoStation.AppInstance
 * @extends SYNO.SDS.AppInstance
 * VideoStation application instance class
 *
 */