Skip to content

Commit

Permalink
fix: Use front-matter title to fix escapes angle brackets
Browse files Browse the repository at this point in the history
  • Loading branch information
tgreyuk committed May 29, 2021
1 parent feef7cc commit c5bc964
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/docusaurus-plugin-typedoc/src/render.ts
@@ -1,5 +1,6 @@
import * as fs from 'fs';
import * as path from 'path';

import ProgressBar from 'progress';
import {
Application,
Expand All @@ -15,7 +16,7 @@ import {
import { GroupPlugin } from 'typedoc/dist/lib/converter/plugins';
import { RendererEvent } from 'typedoc/dist/lib/output/events';
import { TemplateMapping } from 'typedoc/dist/lib/output/themes/DefaultTheme';
import { FrontMatterComponent } from './front-matter';

import { getPluginOptions } from './options';
import { PluginOptions } from './types';

Expand All @@ -34,7 +35,6 @@ const CATEGORY_POSITION = {
export const bootstrap = (app: Application, opts: Partial<PluginOptions>) => {
addTypedocReaders(app);
addTypedocDeclarations(app);
app.renderer.addComponent('fm', new FrontMatterComponent(app.renderer));
app.renderer.render = render;
app.bootstrap({ ...getPluginOptions(opts), theme: path.resolve(__dirname) });
return app.options.getRawValues() as PluginOptions;
Expand Down
4 changes: 4 additions & 0 deletions packages/docusaurus-plugin-typedoc/src/theme.ts
@@ -1,12 +1,16 @@
import MarkdownTheme from 'typedoc-plugin-markdown/dist/theme';
import { Renderer } from 'typedoc/dist/lib/output/renderer';

import { FrontMatterComponent } from './front-matter';

export default class DocusaurusTheme extends MarkdownTheme {
constructor(renderer: Renderer, basePath: string) {
super(renderer, basePath);
renderer.application.options.setValue('hideInPageTOC', true);
renderer.application.options.setValue('hideBreadcrumbs', true);
renderer.application.options.setValue('hidePageTitle', true);
renderer.application.options.setValue('entryDocument', 'index.md');
renderer.addComponent('fm', new FrontMatterComponent(renderer));
}

allowedDirectoryListings() {
Expand Down

0 comments on commit c5bc964

Please sign in to comment.