diff --git a/.github/workflows/docs-publish.yml b/.github/workflows/docs-publish.yml index 52a154169..0df99c93f 100644 --- a/.github/workflows/docs-publish.yml +++ b/.github/workflows/docs-publish.yml @@ -35,13 +35,17 @@ jobs: node-version: 18 - name: Install dependencies - run: | + run: | npm ci npm i jsdoc npm i clean-jsdoc-theme - name: Generate documentation - run: npx jsdoc -c jsdoc.json + run: | + echo "# Web5 JS SDK" > README-docs.md + echo "Select from the menu on the left to view API reference documentation." >> README-docs.md + npx jsdoc -c jsdoc.json + curl -o docs/favicon.ico https://developer.tbd.website/img/favicon.ico - name: Upload documentation artifacts uses: actions/upload-artifact@v3 diff --git a/jsdoc.json b/jsdoc.json index 1505fc5ab..56ae93fe2 100644 --- a/jsdoc.json +++ b/jsdoc.json @@ -2,37 +2,39 @@ "opts": { "encoding": "utf8", "destination": "./docs/", + "readme": "README-docs.md", "recurse": true, - "template": "node_modules/clean-jsdoc-theme" + "template": "node_modules/clean-jsdoc-theme", + "theme_opts": { + "base_url": "https://tbd54566975.github.io/web5-js/", + "default_theme": "dark", + "favicon": "favicon.ico", + "homepageTitle": "Web5 JS API Reference", + "menu": [ + { + "title": "GitHub", + "link": "https://github.com/TBD54566975/web5-js", + "target": "_blank" + } + ], + "search": true, + "title": "API Reference" + } }, "plugins": [], "recurseDepth": 10, "source": { - "include": ["src"], - "includePattern": ".+\\.js(doc|x)?$", - "excludePattern": "(^|\\/|\\\\)_" + "include": ["src"], + "includePattern": ".+\\.js(doc|x)?$", + "excludePattern": "(^|\\/|\\\\)_" }, "sourceType": "module", "tags": { - "allowUnknownTags": true, - "dictionaries": ["jsdoc","closure"] + "allowUnknownTags": true, + "dictionaries": ["jsdoc","closure"] }, "templates": { - "cleverLinks": false, - "monospaceLinks": false - }, - "theme_opts": { - "base_url": "https://tbd54566975.github.io/web5-js/", - "default_theme": "dark", - "homepageTitle": "API Reference", - "menu": [ - { - "title": "GitHub", - "link": "https://github.com/TBD54566975/web5-js", - "target": "_blank" - } - ], - "search": true, - "title": "Web5 JS SDK" + "cleverLinks": false, + "monospaceLinks": false } }