{"id":16050230,"url":"https://github.com/erikyo/tsdoc-action","last_synced_at":"2025-04-05T07:21:35.875Z","repository":{"id":211883730,"uuid":"730187050","full_name":"erikyo/tsdoc-action","owner":"erikyo","description":"This is a GitHub Action to build your TypeScript documentation with TypeDoc.","archived":false,"fork":false,"pushed_at":"2023-12-13T11:59:55.000Z","size":15062,"stargazers_count":2,"open_issues_count":1,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-10T15:13:07.583Z","etag":null,"topics":["documentation","gh-actions","typescript"],"latest_commit_sha":null,"homepage":"https://erikyo.github.io/tsdoc-action/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/erikyo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-12-11T11:43:59.000Z","updated_at":"2024-05-31T07:06:43.000Z","dependencies_parsed_at":"2023-12-11T13:11:27.738Z","dependency_job_id":null,"html_url":"https://github.com/erikyo/tsdoc-action","commit_stats":null,"previous_names":["erikyo/ts-doc-action"],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erikyo%2Ftsdoc-action","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erikyo%2Ftsdoc-action/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erikyo%2Ftsdoc-action/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erikyo%2Ftsdoc-action/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/erikyo","download_url":"https://codeload.github.com/erikyo/tsdoc-action/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247301228,"owners_count":20916471,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["documentation","gh-actions","typescript"],"created_at":"2024-10-09T00:43:07.884Z","updated_at":"2025-04-05T07:21:35.858Z","avatar_url":"https://github.com/erikyo.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# tsdoc-action\n\n\u003e A package for generating documentation for TypeScript / JavaScript projects.\n\nThis is a GitHub Action to build your TypeScript documentation with [TypeDoc](https://typedoc.org/). This action can easily be combined with other deployment actions, in order to publish the generated documentation to, for example, [GitHub Pages](https://pages.github.com). TypeDoc [templates](https://typedoc.org/guides/options/) are also supported.\n\nThis action is inspired by [andstor/jsdoc-action](https://github.com/andstor/jsdoc-action) by [André Storhaug](https://github.com/andstor).\n\nThe following example [workflow step](https://help.github.com/en/actions/configuring-and-managing-workflows/configuring-a-workflow) will generate documentation for all source files in the `./src` directory and output the built files to the `./out` directory.\n\n```yml\n- name: Build\n  uses: erikyo/tsdoc-action@v1\n  with:\n    source_dir: ./src/*\n    output_dir: ./docs\n    front_page: README.md\n```\n\n## Supported platforms\n\nThe tsdoc-action is a JavaScript action and is supported on both Linux, MacOS, and Windows. The action supports stable versions of Node.js 16 and later.\n\n| OS (runs-on) | ubuntu-latest | macos-latest | windows-latest |\n| ---          |:---:          |:---:         |:---:           |\n| Support      | ✅️             | ✅️            | ✅️             |\n\n## Options ⚙️\n\nThe following input variables options can/must be configured:\n\nCertainly! Here's an updated version of your README table with some corrections and additions:\n\n| Input variable              | Necessity | Description                                                                                                                                                                                     | Default                        |\n|-----------------------------|-----------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------|\n| `source_dir`                |           | Entry points for TypeDoc to analyze. same as `source_dir`. it's optional whenever a `entryPonts` was passed                                                                                     |                                |\n| `entryPoints`               | Optional  | Entry points for TypeDoc to analyze. same as `entryPoints`                                                                                                                                      |                                |\n| `output_dir`                | Optional  | Output folder for the generated documentation.                                                                                                                                                  | `./out`                        |\n| `options`                   | Optional  | The path to a TypeDoc configuration file. see https://typedoc.org/options/configuration/#options                                                                                                |                                |\n| `tsconfig`                  | Optional  | The path to a tsconfig.json file. Defaults to ./tsconfig.json                                                                                                                                   | `./tsconfig.json `             |\n| `name`                      | Optional  | Set the name of the project that will be used in the header of the template.                                                                                                                    | Package name from package.json |\n| `titleLink`                 | Optional  | Link the title in the header points to.                                                                                                                                                         |                                |\n| `entryPointStrategy`        | Optional  | Strategy for determining entry points. Valid options are 'resolve' or 'packages'.                                                                                                               |                                |\n| `install_module`            | Optional  | The Plugin, theme, template npm package name that you need to install.                                                                                                                          |                                | \n| `plugin`                    | Optional  | The TypeDoc plugin that you want to use. Requires to be installed using `install_module`.                                                                                                       |                                |\n| `theme`                     | Optional  | The TypeDoc template or theme. Requires the theme to be installed using `install_module`.                                                                                                       |                                |\n| `theme_dir`                 | Optional  | The relative location of the template files directory within the template package.                                                                                                              |                                |\n| `themeColor`                | Optional  | The base color for your theme/template.                                                                                                                                                         |                                |\n| `front_page`                | Optional  | The path to a Markdown file to be used as the front page. Normally `README.md`.                                                                                                                 |                                |\n| `basePath`                  | Optional  | Base path to be used when displaying file paths.                                                                                                                                                |                                |\n| `excludeInternal`           | Optional  | Removes symbols annotated with the `@internal` doc tag.                                                                                                                                         | `true`                         |\n| `excludePrivate`            | Optional  | Removes private class members from the generated documentation.                                                                                                                                 | `false`                        |\n| `excludeProtected`          | Optional  | Removes protected class members from the generated documentation.                                                                                                                               | `false`                        |\n| `excludeReferences`         | Optional  | Removes re-exports of a symbol already included in the documentation from the documentation.                                                                                                    | `false`                        |\n| `excludeCategories`         | Optional  | Removes reflections associated with any of the given categories.                                                                                                                                |                                |\n| `includeVersion`            | Optional  | Includes the version according to package.json in generated documentation.                                                                                                                      | `false`                        |\n| `disableSources`            | Optional  | Disables capturing where reflections are declared when converting input.                                                                                                                        | `false`                        |\n| `sourceLinkTemplate`        | Optional  | Specify a link template to be used when generating source urls.                                                                                                                                 |                                |\n| `gitRevision`               | Optional  | Use specified revision or branch instead of the last revision for linking to source files.                                                                                                      |                                |\n| `gitRemote`                 | Optional  | Use the specified git remote instead of origin for linking to source files.                                                                                                                     |                                |\n| `disableGit`                | Optional  | Prevents TypeDoc from using Git to try to determine if sources can be linked.                                                                                                                   | `false`                        |\n| `readme`                    | Optional  | Path to the readme file that should be displayed on the index page.                                                                                                                             |                                |\n| `stripYamlFrontmatter`      | Optional  | Remove YAML frontmatter from the readme file displayed on the main page.                                                                                                                        | `false`                        |\n| `lightHighlightTheme`       | Optional  | The Shiki theme to be used to highlight code snippets in light mode.                                                                                                                            |                                |\n| `darkHighlightTheme`        | Optional  | The Shiki theme to be used to highlight code snippets in dark mode.                                                                                                                             |                                |\n| `customCss`                 | Optional  | Extra CSS file to be copied into the assets directory and referenced by the theme.                                                                                                              |                                |\n| `markedOptions`             | Optional  | Options to be forwarded to Marked when parsing doc comments.                                                                                                                                    |                                |\n| `cname`                     | Optional  | Text for creating a CNAME file in the output directory.                                                                                                                                         |                                |\n| `sourceLinkExternal`        | Optional  | Treat source links as external links that open in a new tab when generating HTML.                                                                                                               |                                |\n| `htmlLang`                  | Optional  | Sets the lang attribute in TypeDocs HTML output.                                                                                                                                                |                                |\n| `githubPages`               | Optional  | Automatically add a .nojekyll file to the output directory to prevent GitHub Pages from processing your documentation site using Jekyll.                                                        |                                |\n| `cacheBust`                 | Optional  | Include the generation time in `script` and `link` tags to JS/CSS assets to prevent assets from a previous build of the documentation from being used.                                          |                                |\n| `gaID`                      | Optional  | Set the Google Analytics tracking ID and activate tracking code.                                                                                                                                |                                |\n| `hideParameterTypesInTitle` | Optional  | Hide parameter types in the signature \"title\" for easier scanning.                                                                                                                              |                                |\n| `hideGenerator`             | Optional  | Do not print the TypeDoc link at the end of the page.                                                                                                                                           |                                |\n| `searchInComments`          | Optional  | Enables searching comment text in the generated documentation site.                                                                                                                             |                                |\n| `cleanOutputDir`            | Optional  | Prevent TypeDoc from cleaning the output directory specified with `--out`.                                                                                                                      |                                |\n| `externalPattern`           | Optional  | Patterns for external packages that should be included in the documentation.                                                                                                                    |                                |\n| `excludeExternals`          | Optional  | Prevent externally resolved TypeScript files from being documented. Defaults to `false`.                                                                                                        | `false`                        |\n| `excludeNotDocumented`      | Optional  | Exclude symbols that are not explicitly documented. Defaults to `false`.                                                                                                                        | `false`                        |\n| `excludeNotDocumentedKinds` | Optional  | Exclude symbols of the given kinds if they are not explicitly documented.                                                                                                                       |                                |\n| `excludeInternal`           | Optional  | Exclude symbols marked with the `@internal` tag. Defaults to `false`.                                                                                                                           | `false`                        |\n| `excludePrivate`            | Optional  | Exclude symbols marked with the `@private` tag. Defaults to `false`.                                                                                                                            | `false`                        |\n| `excludeProtected`          | Optional  | Exclude symbols marked with the `@protected` tag. Defaults to `false`.                                                                                                                          | `false`                        |\n| `excludeReferences`         | Optional  | Exclude references of symbols already included in the documentation. Defaults to `false`.                                                                                                       | `false`                        |\n| `excludeCategories`         | Optional  | Exclude reflections associated with any of the given categories.                                                                                                                                |                                |\n| `showConfig`                | Optional  | Show the resolved configuration and exit.                                                                                                                                                       |                                |\n| `skipErrorChecking`         | Optional  | Instructs TypeDoc to not run the type checker before converting a project. Enabling this option may improve generation time, but could also result in crashes if your code contains type errors |                                |\n\nPlease note that I added the missing options and adjusted the names of some options to match the actual code implementation. Feel free to adapt it further based on your preferences.\n## Templates and Plugins 🖌️\n\nYou can use TypeDoc [templates](https://typedoc.org/guides/options/) with this action.  \nJust set the `theme` or the `plugin` input variable to the name of the template you want to use and use the `install_module` to install that package (this needs to be the template's package name.). \n\n## TypeDoc Configuration file 📄\n\nTo use a TypeDoc [configuration file](https://typedoc.org/guides/options/) located in your repository, you will need to specify the path to the file in the `config_file` input variable. Normally, if you use the [actions/checkout](https://github.com/actions/checkout), this will just resolve to `tsconfig.json` or `typedoc.json`.\n\n## Examples\n\n### GitHub Pages 🚀\n\nAn example for deploying TypeDoc generated documentation to GitHub Pages with [actions-gh-pages](https://github.com/marketplace/actions/github-pages-action#table-of-contents).\n\nThis tsdoc-action workflow configuration uses the [default](https://typedoc.org/guides/themes/default/) TypeDoc template and uses the root `README.md` file as the front page.\n\n```yml\n# Simple workflow for deploying static content to GitHub Pages\nname: TSDoc Actions\n\non:\n  release:\n  # Allows you to run this workflow manually from the Actions tab\n  workflow_dispatch:\n\n# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages\npermissions:\n  contents: read\n  pages: write\n  id-token: write\n\njobs:\n  # Single deploy job since we're just deploying\n  deploy:\n    name: Deploy Documentation\n\n    # Deploy to the github-pages environment\n    environment:\n      name: github-pages\n      url: ${{ steps.deployment.outputs.page_url }}\n\n    # Specify runner + deployment step\n    runs-on: ubuntu-latest\n    steps:\n      - name: Checkout code\n        uses: actions/checkout@v3\n\n      - name: Setup Node\n        uses: actions/setup-node@v3\n        with:\n          node-version: 16\n          cache: \"npm\"\n\n      - name: TSDoc Action\n        uses: erikyo/tsdoc-action@v1\n        with:\n          source_dir: ./src/*\n          output_dir: ./docs\n          front_page: README.md\n\n      - name: Setup Pages\n        uses: actions/configure-pages@v3\n\n      - name: Upload artifact\n        uses: actions/upload-pages-artifact@v2\n        with:\n          # Upload entire repository\n          path: './docs'\n\n      - name: Deploy to GitHub Pages\n        id: deployment\n        uses: actions/deploy-pages@v2\n```\n\n## License\n\nCopyright © 2023 [Erik Golinelli](https://github.com/erikyo)\n\nThe tsdoc-action GitHub action is licensed under the [Apache License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0).  \nSee the [LICENSE](https://github.com/erikyo/tsdoc-action/blob/master/LICENSE) file for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ferikyo%2Ftsdoc-action","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ferikyo%2Ftsdoc-action","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ferikyo%2Ftsdoc-action/lists"}