Skip to content

Commit

Permalink
Merge branch 'next-dev' into next
Browse files Browse the repository at this point in the history
  • Loading branch information
tgreyuk committed Apr 26, 2024
2 parents 6863663 + 9b49bbb commit 6ea429a
Show file tree
Hide file tree
Showing 44 changed files with 334 additions and 384 deletions.
5 changes: 5 additions & 0 deletions .changeset/four-bugs-fail.md
@@ -0,0 +1,5 @@
---
"typedoc-plugin-markdown": patch
---

- Removed deprecated options.
5 changes: 5 additions & 0 deletions .changeset/great-phones-fetch.md
@@ -0,0 +1,5 @@
---
"typedoc-plugin-markdown": patch
---

- Tweaked link behaviour in page header.
4 changes: 2 additions & 2 deletions docs/pages/_meta.js
Expand Up @@ -12,10 +12,10 @@ export default {
},
docs: {
type: 'page',
title: 'Documentation',
title: 'Docs',
},
plugins: {
title: 'Related Plugins',
title: 'Child Plugins',
type: 'page',
},
'api-docs': {
Expand Down
14 changes: 14 additions & 0 deletions docs/pages/api-docs/Class.MarkdownThemeContext.md
Expand Up @@ -1172,6 +1172,20 @@ Please note that partials:

`string`

#### getPropertyDefaultValue()

> **getPropertyDefaultValue**: (`model`) => `null` \| `string`
##### Parameters

| Parameter | Type |
| :------ | :------ |
| `model` | [`DeclarationReflection`](https://typedoc.org/api/classes/Models.DeclarationReflection.html) |

##### Returns

`null` \| `string`

#### getReturnType()

> **getReturnType**: (`model`?) => `string`
Expand Down
28 changes: 20 additions & 8 deletions docs/pages/api-docs/Interface.PluginOptions.md
Expand Up @@ -92,14 +92,6 @@ Do not print breadcrumbs.

***

### hideInPageTOC

> **hideInPageTOC**: `boolean`
Do not render in-page TOC items.

***

### hidePageHeader

> **hidePageHeader**: `boolean`
Expand Down Expand Up @@ -156,6 +148,26 @@ Merges the resolved readme into the project index page.

***

### navigationModel

> **navigationModel**: `object`
Configures how the navigation model will be generated.

#### excludeGroups

> **excludeGroups**: `boolean`
#### excludeCategories

> **excludeCategories**: `boolean`
#### excludeFolders

> **excludeFolders**: `boolean`
***

### outputFileStrategy

> **outputFileStrategy**: `"members"` \| `"modules"`
Expand Down
6 changes: 6 additions & 0 deletions docs/pages/api-docs/Interface.TextContentMappings.md
Expand Up @@ -46,6 +46,12 @@ Describes the keys available to replace static text.
***

### label.apiIndex

> **label.apiIndex**: `string`
***

### label.defaultValue

> **label.defaultValue**: `string`
Expand Down
2 changes: 1 addition & 1 deletion docs/pages/api-docs/_meta.js
@@ -1,5 +1,5 @@
export default {
"index": "Index",
"index": "API Index",
"Application": {
"type": "separator",
"title": "Application"
Expand Down
1 change: 1 addition & 0 deletions docs/pages/docs/_meta.js
Expand Up @@ -17,5 +17,6 @@ export default {
type: 'separator',
title: 'Support',
},
examples: '',
changelog: '',
};
24 changes: 24 additions & 0 deletions docs/pages/docs/examples.mdx
@@ -0,0 +1,24 @@
import { Cards, Callout } from 'nextra/components';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import { faGithub } from '@fortawesome/free-brands-svg-icons';
import { faExternalLinkAlt } from '@fortawesome/free-solid-svg-icons';

# Examples

Here is a list of examples showcasing the output generated using the plugin. Available on GitHub <FontAwesomeIcon icon={faGithub} style={{display:'inline',width:'16px',marginTop:'-1px'}} />.

## Index

| Example | Description |
| :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :------------------------------------------------------------------------ |
| [Default options <FontAwesomeIcon icon={faExternalLinkAlt} style={{display:'inline',width:'12px'}} />](https://raw.githubusercontent.com/tgreyuk/typedoc-plugin-markdown-examples/main/examples/01-default-options-example/docs/README.md) | This example uses the default settings of the plugin. |
| [Customized UX options <FontAwesomeIcon icon={faExternalLinkAlt} style={{display:'inline',width:'12px'}} />](https://raw.githubusercontent.com/tgreyuk/typedoc-plugin-markdown-examples/main/examples/02-ux-options-example/docs/README.md) | This example showcases how the UX can be customised. |
| [Single page modules <FontAwesomeIcon icon={faExternalLinkAlt} style={{display:'inline',width:'12px'}} />](https://raw.githubusercontent.com/tgreyuk/typedoc-plugin-markdown-examples/main/examples/03-single-page-modules-example/docs/README.md) | This example demonstrates output with single page modules. |
| [Single page docs <FontAwesomeIcon icon={faExternalLinkAlt} style={{display:'inline',width:'12px'}} />](https://raw.githubusercontent.com/tgreyuk/typedoc-plugin-markdown-examples/main/examples/04-single-page-docs-example/docs/README.md) | This example shows the output to a single page with a single entry point. |
| [Packages <FontAwesomeIcon icon={faExternalLinkAlt} style={{display:'inline',width:'12px'}} />](https://raw.githubusercontent.com/tgreyuk/typedoc-plugin-markdown-examples/main/examples/05-packages-example/docs/README.md) | This example showcases packages mode. |

## Repository

For clearer viewing, these examples open on `https://raw.githubusercontent.com`.

If you would like to view the configuration and source then explore the [examples GitHub repository <FontAwesomeIcon icon={faExternalLinkAlt} style={{display:'inline',width:'12px'}} />](https://github.com/tgreyuk/typedoc-plugin-markdown-examples) in the normal web interface.
17 changes: 1 addition & 16 deletions docs/pages/docs/index.mdx
@@ -1,8 +1,5 @@
import { Cards, Callout } from 'nextra/components';
import pjson from '../../../packages/typedoc-plugin-markdown/package.json';
import Image from 'next/image';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import { faGithub } from '@fortawesome/free-brands-svg-icons';

# typedoc-plugin-markdown

Expand All @@ -19,17 +16,5 @@ This plugin enables TypeDoc to output documentation in Markdown. Since many tool
- [MDX](https://mdxjs.com/) and [GFM](https://github.github.com/gfm/) compliant.
- Works alongside other TypeDoc plugins.
- Configurable output file structure.
- Configurable UI options
- Configurable UX options
- [Frontmatter](/plugins/frontmatter) and [Remark](/plugins/remark) utility plugins available.

## Examples

<Cards num={2}>
<Cards.Card
title="View on Github"
icon={<FontAwesomeIcon icon={faGithub} />}
arrow={true}
href="https://github.com/tgreyuk/typedoc-plugin-markdown-examples/tree/main/examples/01-typedoc-plugin-markdown"
target="_blank"
/>
</Cards>
57 changes: 5 additions & 52 deletions docs/pages/docs/options.mdx
Expand Up @@ -202,7 +202,7 @@ Please note a separate modules index page will not be generated, therefore would

> Accepts a boolean value. Defaults to `false`.
By default when a readme file is resolved, a separate readme page is created. This option prepends the readme contents into the index page so only a single root page is generated.
By default when a readme file is resolved, a separate readme page is created. This option appends the index page to the readme so only a single root page is generated.

This option has no effect when [`readme`](https://typedoc.org/options/input/#readme) is set to `"none"`.

Expand Down Expand Up @@ -253,7 +253,7 @@ Ignored if `flattenOutputFiles` is set to `true`.

---

## UI Options
## UX Options

### hidePageHeader

Expand Down Expand Up @@ -297,54 +297,6 @@ Ignored if `flattenOutputFiles` is set to `true`.

---

### ~hideInPageTOC~

<Callout type="warning">
Deprecated - In-page TOC is now hidden as default.
</Callout>

> Accepts a boolean value. Defaults to `false`.
```json filename="typedoc.json"
{
"hideInPageTOC": false
}
```

---

### ~indexPageTitle~

<Callout type="warning">Deprecated - Please use `textContentMappings`.</Callout>

> Accepts a string value. Defaults to `"{ProjectName}"`.
Provides a mechanism to change the main project index page title.

```json filename="typedoc.json"
{
"indexPageTitle": "{ProjectName}"
}
```

---

### ~memberPageTitle~

<Callout type="warning">Deprecated - Please use `textContentMappings`.</Callout>

> Accepts a string value. Defaults to `"{kind}: {name}"`.
Provides a mechanism to configure the page title of members.

```json filename="typedoc.json"
{
"memberPageTitle": "{kind}: {name}"
}
```

---

### excludeGroups

<Callout emoji="💡">
Expand Down Expand Up @@ -552,7 +504,7 @@ Keys are categorised with the following namespace conventions:
- `header.*` defines text in the page header (if displayed).
- `breadcrumbs.*` defines breadcrumbs in page header (if displayed).
- `title.*` defines text in main page titles.
- `label.*` other text in page content, including headings and table headers.
- `label.*` other text in page content, including content headings and table headers.
- `kind.*` defines text mappings to TypeDoc's `ReflectionKind` definitions.

Only keys that require translation need to be added to the object.
Expand All @@ -562,11 +514,12 @@ Only keys that require translation need to be added to the object.
"textContentMappings": {
"header.title": "{projectName} {version}",
"header.readme": "Readme",
"header.docs": "API",
"header.docs": "Docs",
"breadcrumbs.home": "{projectName} {version}",
"title.indexPage": "{projectName} {version}",
"title.modulePage": "{name}",
"title.memberPage": "{kind}: {name}",
"label.apiIndex": "API Index",
"label.defaultValue": "Default value",
"label.description": "Description",
"label.extendedBy": "Extended by",
Expand Down
2 changes: 0 additions & 2 deletions docs/pages/docs/quick-start.mdx
Expand Up @@ -38,5 +38,3 @@ Or:
```shell filename="CLI"
npm run docs
```

For more information please see the [Using TypeDoc](/docs/using-typedoc) guide.
6 changes: 3 additions & 3 deletions docs/pages/docs/using-typedoc.mdx
Expand Up @@ -26,11 +26,11 @@ TypeDoc's [Output](https://typedoc.org/options/output/) options are used by the
Below is a list of which TypeDoc Output options are supported or not:

- `--out` Yes ✅
- `--theme` Yes ✅
- `--theme` Yes ✅ (theme should be MarkdownTheme instance)
- `--cleanOutputDir` Yes ✅
- `--basePath` Yes ✅
- `--hideParameterTypesInTitle` No ❌ (see [`--expandParameters`](/docs/options#expandparameters))
- `--navigation` No ❌ (see [`navigation`](/docs/navigation))
- `--hideParameterTypesInTitle` No ❌ (use [`--expandParameters`](/docs/options#expandparameters))
- `--navigation` No ❌ (use [`--navigationModel`](/docs/options#navigationmodel))
- `--titleLink` No ❌
- `--navigationLinks` No ❌
- `--sidebarLinks` No ❌
Expand Down
2 changes: 1 addition & 1 deletion docs/pages/index.mdx
Expand Up @@ -9,7 +9,7 @@ import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
typedoc-plugin-markdown
</span>
<div className="flex md:flex-row items-center text-3xl">
<Image src="/ts-logo.png" alt="TypeScript" width={50} height={50} />
<Image src="/ts-logo.png" alt="TypeScript" width={54} height={54} />
<span className="px-2"> → </span>
<div style={{ width: '90px' }}>
<FontAwesomeIcon icon={faMarkdown} />
Expand Down
28 changes: 9 additions & 19 deletions docs/pages/plugins/_meta.js
@@ -1,27 +1,17 @@
export default {
index: 'Index',

index: 'Child Plugins Index',
'-- Utils': {
type: 'separator',
title: 'Utils',
},

frontmatter: 'typedoc-plugin-frontmatter',
remark: 'typedoc-plugin-remark',

'-- Themes': {
frontmatter: '',
remark: 'Remark',
'-- Themes & Integrations': {
type: 'separator',
title: 'Themes',
title: 'Themes & Integrations',
},

vitepress: 'typedoc-vitepress-theme',
'github-wiki': 'typedoc-github-wiki-theme',
'gitlab-wiki': 'typedoc-gitlab-wiki-theme',

'-- Integrations': {
type: 'separator',
title: 'Integrations',
},

docusaurus: 'docusaurus-plugin-typedoc',
docusaurus: 'Docusaurus',
vitepress: '',
'github-wiki': 'Github Wiki',
'gitlab-wiki': 'Gitlab Wiki',
};

0 comments on commit 6ea429a

Please sign in to comment.