typedoc-plugin-markdown
Advanced tools
Comparing version 2.0.5 to 2.0.6
@@ -19,2 +19,3 @@ "use strict"; | ||
const theme_gitbook_1 = require("./theme/theme.gitbook"); | ||
const theme_vuepress_1 = require("./theme/theme.vuepress"); | ||
let MarkdownPlugin = MarkdownPlugin_1 = class MarkdownPlugin extends components_1.ConverterComponent { | ||
@@ -81,2 +82,5 @@ initialize() { | ||
} | ||
if (platform === 'vuepress') { | ||
return new theme_vuepress_1.VuePressTheme(renderer, themePath, options); | ||
} | ||
} | ||
@@ -83,0 +87,0 @@ return new theme_1.MarkdownTheme(renderer, themePath, options); |
@@ -6,2 +6,3 @@ "use strict"; | ||
const theme_gitbook_1 = require("../theme.gitbook"); | ||
const theme_vuepress_1 = require("../theme.vuepress"); | ||
const relative_url_1 = require("./relative-url"); | ||
@@ -26,3 +27,5 @@ function breadcrumbs() { | ||
function isVisible() { | ||
if (plugin_1.MarkdownPlugin.theme instanceof theme_docusaurus_1.DocusaurusTheme || plugin_1.MarkdownPlugin.theme instanceof theme_gitbook_1.GitbookTheme) { | ||
if (plugin_1.MarkdownPlugin.theme instanceof theme_docusaurus_1.DocusaurusTheme || | ||
plugin_1.MarkdownPlugin.theme instanceof theme_gitbook_1.GitbookTheme || | ||
plugin_1.MarkdownPlugin.theme instanceof theme_vuepress_1.VuePressTheme) { | ||
return false; | ||
@@ -29,0 +32,0 @@ } |
@@ -5,2 +5,3 @@ "use strict"; | ||
const theme_docusaurus_1 = require("../theme.docusaurus"); | ||
const theme_vuepress_1 = require("../theme.vuepress"); | ||
function metadata() { | ||
@@ -41,3 +42,3 @@ if (!isVisible()) { | ||
function isVisible() { | ||
if (plugin_1.MarkdownPlugin.theme instanceof theme_docusaurus_1.DocusaurusTheme) { | ||
if (plugin_1.MarkdownPlugin.theme instanceof theme_docusaurus_1.DocusaurusTheme || plugin_1.MarkdownPlugin.theme instanceof theme_vuepress_1.VuePressTheme) { | ||
return true; | ||
@@ -44,0 +45,0 @@ } |
@@ -6,2 +6,3 @@ "use strict"; | ||
const theme_gitbook_1 = require("../theme.gitbook"); | ||
const theme_vuepress_1 = require("../theme.vuepress"); | ||
const heading_1 = require("./heading"); | ||
@@ -17,3 +18,5 @@ const relative_url_1 = require("./relative-url"); | ||
function isVisible() { | ||
if (plugin_1.MarkdownPlugin.theme instanceof theme_docusaurus_1.DocusaurusTheme || plugin_1.MarkdownPlugin.theme instanceof theme_gitbook_1.GitbookTheme) { | ||
if (plugin_1.MarkdownPlugin.theme instanceof theme_docusaurus_1.DocusaurusTheme || | ||
plugin_1.MarkdownPlugin.theme instanceof theme_gitbook_1.GitbookTheme || | ||
plugin_1.MarkdownPlugin.theme instanceof theme_vuepress_1.VuePressTheme) { | ||
return false; | ||
@@ -20,0 +23,0 @@ } |
{ | ||
"name": "typedoc-plugin-markdown", | ||
"version": "2.0.5", | ||
"version": "2.0.6", | ||
"description": "A plugin for TypeDoc that enables TypeScript API documentation to be generated in Markdown.", | ||
@@ -12,3 +12,4 @@ "main": "dist/index.js", | ||
"build": "rimraf dist && tsc && copyfiles --up 2 ./src/**/*.hbs ./dist/", | ||
"prepare": "npm run lint && npm run test && npm run build", | ||
"prepare": "npm run test && npm run build", | ||
"pretest": "npm run lint", | ||
"test": "jest", | ||
@@ -15,0 +16,0 @@ "examples": "npm run build && node ./tasks/examples.js", |
@@ -18,44 +18,15 @@ # typedoc-plugin-markdown | ||
#### shell | ||
```bash | ||
$ node_modules/.bin/typedoc --theme markdown | ||
$ typedoc --theme markdown [plugin args] [typedoc args] | ||
``` | ||
#### npm script | ||
### Arguments | ||
```json | ||
"scripts": { | ||
"docs": "typedoc --theme markdown" | ||
} | ||
``` | ||
The plugin exposes the following additional arguments: | ||
## Arguments | ||
- `--platform <docusaurus|gitbook|vuepress|bitbucket>`<br> | ||
Target a specific documentation/hosting platform (see [Wiki page](https://github.com/tgreyuk/typedoc-plugin-markdown/wiki/1.-Targeting-Platforms) for further documentation), | ||
- `--hideSources`<br> | ||
Suppress source file linking from output. | ||
The plugin exposes the following arguments in addition to TypeDoc's defaults: | ||
| Name | Description | | ||
| --------------- | ------------------------------------------------- | | ||
| `--platform` | Target a specific documentation/hosting platform. | | ||
| `--hideSources` | Suppress source file linking from output. | | ||
### Targeting specific platforms | ||
By default the theme will render standard **GitHub Flavored Markdown** / CommonMark suitable for the majority of markdown engines. | ||
The plugin also attempts to target the following platforms: | ||
#### GitBook (`--platform gitbook`) | ||
- Generates additional `SUMMARY.md` file to enable a books's table of contents / navigation. | ||
#### Docusaurus (`--platform docusaurus`) | ||
- Adds metadata to rendered Markdown. | ||
- If the out directory is recognised as a docusaurus `/docs` directory, the plugin will update `website/sidebars.json` so pages are accessible in the sidebar. | ||
#### Bitbucket (`--platform bitbucket`) | ||
- Support Bitbucket's internal/anchor links in rendered Markdown. | ||
## Version 2 (June 2019) | ||
@@ -62,0 +33,0 @@ |
Sorry, the diff of this file is not supported yet
59553
52
1245
40
5