Skip to content

ink-feather-org/typedoc-plugin-asciidoctor-ts

Repository files navigation

@ink-feather-org/typedoc-plugin-asciidoctor

This plugin adds README.adoc support to typedoc. To use this plugin specify the readme option for typedoc.

tsconfig.json

{
  "typedocOptions": {
    "entryPoints": ["src/index.ts"],
    "out": "docs",
    "readme": "README.adoc",
    "excludePrivate": true,
    "plugin": [ "@ink-feather-org/typedoc-plugin-asciidoctor" ]
  }
}

Known issues

Typedoc runs the output of asciidoc through a markdown renderer. Unfortunately there is nothing a plugin can do about that. This sometimes causes rendering issues.

What this plugin does:

Take a 'README.adoc' and render it to 'html' before sending it off to typedoc which then passes it to the output generator.

What this plugin does NOT do:

Add support for typedoc to generate '.adoc' output.

In other words

This plugin does NOT enable you to use ascii-doc in the javadoc comments ONLY in the README. It also does NOT generate '.adoc' output. It only integrates an existing 'README.adoc' into the typedoc output.

Try the example

Steps:

  1. Clone the repo

  2. cd into example

  3. pnpm i

  4. pnpm run docs

  5. Verify that the typedoc generated correctly

Only try to integrate my plugin into your project after you have verified that the example works.

Contributing

Pull requests that add ascii-doc output functionality are welcome (Issue).