-
Notifications
You must be signed in to change notification settings - Fork 172
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
208 changed files
with
3,974 additions
and
4,863 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
These folder is intended for internal dev purposes. | ||
|
||
For plugin examples please visit: | ||
|
||
- https://github.com/tgreyuk/typedoc-plugin-markdown-examples | ||
- https://github.com/tgreyuk/typedoc-vitepress-theme-example |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"extends": ["../../../stubs/typedoc.cjs"], | ||
"entryPoints": ["../../../stubs/src/packages/*"], | ||
"entryPointStrategy": "packages", | ||
"outputFileStrategy": "modules", | ||
"plugin": [ | ||
"../../../packages/typedoc-plugin-markdown/dist", | ||
"../../../packages/typedoc-vitepress-theme/dist" | ||
], | ||
"sidebar": { | ||
"collapse": false, | ||
"pretty": true | ||
} | ||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
dev-packages/generate-readmes/cli.ts → dev/packages/generate-readmes/cli.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
dev-packages/generate-readmes/package.json → dev/packages/generate-readmes/package.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
dev-packages/helpers/package.json → dev/packages/helpers/package.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
dev-packages/prebuild-options/cli.ts → dev/packages/prebuild-options/cli.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
dev-packages/prebuild-options/package.json → dev/packages/prebuild-options/package.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"local-plugins": "Writing a Local plugin", | ||
"navigation": "Consuming Navigtion", | ||
"hooks": "Utilizing Hooks", | ||
"custom-theme": "Custom Theme" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
# Custom Theme | ||
|
||
If there are some specific customization not achievable with hooks then a more advanced customization can be achieved by providing a new theme class which returns a different context class. | ||
|
||
In theory all available templates, partials and helpers can be overriden with custom implementations, but please proceed with caution. | ||
|
||
Please consider raising a PR to the plugin directly if you think your customizations would be useful to others. | ||
|
||
```js filename="custom-plugin.mjs" | ||
// @ts-check | ||
|
||
/** | ||
* @param {import('typedoc-plugin-markdown').MarkdownApplication} app | ||
*/ | ||
export function load(app) { | ||
// Add a hook to insert markdown at the top of the page. | ||
app.renderer.defineTheme('custom-theme', MyMarkdownTheme); | ||
} | ||
|
||
class MyMarkdownTheme extends MarkdownTheme { | ||
/** | ||
* @param {import('typedoc-plugin-markdown').MarkdownPageEvent} page | ||
*/ | ||
getRenderContext(page) { | ||
return new MyMarkdownThemeRenderContext( | ||
this, | ||
page, | ||
this.application.options, | ||
); | ||
} | ||
} | ||
|
||
class MyMarkdownThemeRenderContext extends MarkdownThemeRenderContext { | ||
partials = { | ||
...this.partials, | ||
/** | ||
* @param {import('typedoc-plugin-markdown').MarkdownPageEvent} page | ||
*/ | ||
header: (page) => { | ||
return `Welcome to ${page.project.name} custom header!`; | ||
}, | ||
}; | ||
} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# Utilizing Hooks | ||
|
||
Hooks allows Markdown (or HTML) to be injected into the output in specific locations and are the most basic form form of customization. | ||
|
||
```js filename="local-plugins/custom-plugin.mjs" | ||
// @ts-check | ||
|
||
/** | ||
* @param {import('typedoc-plugin-markdown').MarkdownApplication} app | ||
*/ | ||
export function load(app) { | ||
// Add a hook to insert markdown at the top of the page. | ||
app.renderer.markdownHooks.on( | ||
'page.begin', | ||
() => '> This is some markdown at the top of the page', | ||
); | ||
} | ||
``` | ||
|
||
Available hooks are: | ||
|
||
- `page.begin` - Applied at the start of the markdown output. | ||
- `page.end` - Applied at the end of the markdown output. | ||
- `content.begin` - Applied before the main markdown content is rendered.. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import { Callout, FileTree } from 'nextra/components'; | ||
|
||
# Writing a Local plugin | ||
|
||
To get started a create a local TypeDoc plugin file. Here we are writing a file in a directory named `local-plugins` and referencing it in `typedoc.json`. | ||
|
||
```js filename="local-plugins/my-custom-plugin.mjs" | ||
// @ts-check | ||
|
||
/** | ||
* @param {import('typedoc-plugin-markdown').MarkdownApplication} app | ||
*/ | ||
export function load(app) { | ||
// Additional customization should be placed in the load function. | ||
} | ||
``` | ||
|
||
The file can the be referenced in the `typedoc.json` file. | ||
|
||
```json filename="typedoc.json" | ||
{ | ||
"plugin": ["typedoc-plugin-markdown", "./local-plugins/my-custom-plugin.mjs"] | ||
} | ||
``` |
Oops, something went wrong.