typedoc-plugin-frontmatter
Advanced tools
Comparing version
@@ -78,3 +78,3 @@ "use strict"; | ||
var _a, _b; | ||
if ((_a = Object.keys(page.frontmatter)) === null || _a === void 0 ? void 0 : _a.length) { | ||
if (page.frontmatter && ((_a = Object.keys(page.frontmatter)) === null || _a === void 0 ? void 0 : _a.length)) { | ||
page.contents = (_b = page === null || page === void 0 ? void 0 : page.contents) === null || _b === void 0 ? void 0 : _b.replace(/^/, `---\n${yaml.stringify(page.frontmatter)}---\n\n`).replace(/[\r\n]{3,}/g, '\n\n'); | ||
@@ -81,0 +81,0 @@ } |
import { ManuallyValidatedOption } from 'typedoc'; | ||
declare module 'typedoc' { | ||
interface TypeDocOptionMap { | ||
frontmatterCommentTags: any[]; | ||
frontmatterGlobals: ManuallyValidatedOption<FrontmatterGlobals>; | ||
readmeFrontmatter: ManuallyValidatedOption<ReadmeFrontmatter>; | ||
frontmatterNamingConvention: 'camelCase' | 'snakeCase'; | ||
indexFrontmatter: ManuallyValidatedOption<IndexFrontmatter>; | ||
frontmatterCommentTags: any[]; | ||
preserveFrontmatterCommentTags: boolean; | ||
frontmatterNamingConvention: 'camelCase' | 'snakeCase'; | ||
readmeFrontmatter: ManuallyValidatedOption<ReadmeFrontmatter>; | ||
} | ||
} | ||
export interface PluginOptions { | ||
frontmatterGlobals: ManuallyValidatedOption<FrontmatterGlobals>; | ||
readmeFrontmatter: ManuallyValidatedOption<ReadmeFrontmatter>; | ||
indexFrontmatter: ManuallyValidatedOption<IndexFrontmatter>; | ||
frontmatterCommentTags: any[]; | ||
frontmatterGlobals: FrontmatterGlobals; | ||
frontmatterNamingConvention: 'camelCase' | 'snakeCase'; | ||
indexFrontmatter: IndexFrontmatter; | ||
preserveFrontmatterCommentTags: boolean; | ||
frontmatterNamingConvention: 'camelCase' | 'snakeCase'; | ||
readmeFrontmatter: ReadmeFrontmatter; | ||
} | ||
@@ -20,0 +20,0 @@ export interface FrontmatterGlobals { |
{ | ||
"name": "typedoc-plugin-frontmatter", | ||
"version": "1.0.0-next.1", | ||
"description": "A plugin for TypeDoc that prepends configurable frontmatter to page content.", | ||
"version": "1.0.0", | ||
"description": "A plugin for TypeDoc ( + typedoc-plugin-markdown ) that prepends configurable frontmatter to page content.", | ||
"main": "dist/index.js", | ||
@@ -22,10 +22,10 @@ "files": [ | ||
"bugs": { | ||
"url": "https://github.com/tgreyuk/typedoc-plugin-markdown/issues" | ||
"url": "https://github.com/typedoc2md/typedoc-plugin-markdown/issues" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/tgreyuk/typedoc-plugin-markdown.git", | ||
"url": "git+https://github.com/typedoc2md/typedoc-plugin-markdown.git", | ||
"directory": "packages/typedoc-plugin-frontmatter" | ||
}, | ||
"homepage": "https://typedoc-plugin-markdown.org/utilities/frontmatter/introduction", | ||
"homepage": "https://typedoc-plugin-markdown.org/plugins/frontmatter", | ||
"dependencies": { | ||
@@ -35,9 +35,8 @@ "yaml": "^2.3.4" | ||
"peerDependencies": { | ||
"typedoc-plugin-markdown": ">=4.0.0-next.54" | ||
"typedoc-plugin-markdown": ">=4.0.0" | ||
}, | ||
"keywords": [ | ||
"frontmatter", | ||
"typedoc", | ||
"typedoc-plugin" | ||
"typedoc" | ||
] | ||
} |
# typedoc-plugin-frontmatter | ||
 [](https://github.com/tgreyuk/typedoc-plugin-markdown/actions/workflows/ci.yml) | ||
[](https://www.npmjs.com/package/typedoc-plugin-frontmatter) [](https://github.com/typedoc2md/typedoc-plugin-markdown/actions/workflows/ci.typedoc-plugin-frontmatter.yml) | ||
A plugin for TypeDoc that prepends configurable frontmatter to page content. | ||
> A plugin for TypeDoc ( + typedoc-plugin-markdown ) that prepends configurable frontmatter to page content. | ||
@@ -15,2 +15,6 @@ ## Installation | ||
Please visit [typedoc-plugin-markdown.org](https://typedoc-plugin-markdown.org/utilities/frontmatter/introduction) for comprehensive documentation, including options and usage guides. | ||
Please visit the [https://typedoc-plugin-markdown.org/plugins/frontmatter](https://typedoc-plugin-markdown.org/plugins/frontmatter) for comprehensive documentation, including options and usage guides. | ||
## License | ||
MIT |
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
No website
QualityPackage does not have a website.
Found 1 instance in 1 package
13241
1%0
-100%19
26.67%