typedoc-plugin-extras

A plugin for TypeDoc that adds extras to the generated documentation (favicon and date/time of generation).

Usage no npm install needed!

<script type="module">
  import typedocPluginExtras from 'https://cdn.skypack.dev/typedoc-plugin-extras';
</script>

README

typedoc-plugin-extras

This plugin only works for HTML documentation.

A plugin for TypeDoc that adds extras to the generated documentation (favicon and date/time of generation).

  • It can set custom top-most title name and/or link
  • It can find the <head> of the document and append a favicon to it.
  • It can also add date/time of generation after "Generated using TypeDoc" in the footer (see Example).

No date/time will be added if --hideGenerator is set (because the footer wouldn't exist).

Feel free to ask for another extra or to make a PR 😉

npm

Example

Example

Installation

npm install --save-dev typedoc-plugin-extras

Usage

$ npx typedoc --plugin typedoc-plugin-extras [args]

Arguments

The following arguments can be used in addition to the default TypeDoc arguments.

  • --customTitle
    Specify a custom title, for the top-most title only.
    Example: foo

  • --customTitleLink
    Specify a custom link for the top-most title.
    Example: https://parent-docs-site.com

  • --customDescription
    Specify a custom meta description.
    Example: A test description

  • --favicon
    Specify the name or URL of the favicon file.
    Example: public/favicon.ico

  • --footerTypedocVersion
    Appends the TypeDoc version in the footer.
    Default: false

  • --footerDate
    Appends the date of generation in the footer.
    Default: false

  • --footerTime
    Appends the time of generation in the footer.
    Default: false

Note:

  • All extras are disabled by default, they are now opt-in.
  • When favicon is enabled, its file is copied into the documentation's output directory (--out).

Testing

To test this plugin, you can generate TypeDoc documentation for this plugin.

To do this, you'll first need to build the plugin:

npm run build

Then, link the package to the current repo, to have it in the local node_modules:

npm link
npm link typedoc-plugin-extras 

You can now generate the documentation with the plugin (from the source):

npm run test

License

MIT