Skip to content

Commit

Permalink
fix: tweaks to link behaviour in page header
Browse files Browse the repository at this point in the history
  • Loading branch information
tgreyuk committed Apr 26, 2024
1 parent fc0f584 commit 38442e4
Show file tree
Hide file tree
Showing 35 changed files with 276 additions and 211 deletions.
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
20 changes: 20 additions & 0 deletions docs/pages/api-docs/Interface.PluginOptions.md
Expand Up @@ -156,6 +156,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>
9 changes: 5 additions & 4 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 @@ -552,7 +552,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 +562,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',
};
53 changes: 25 additions & 28 deletions docs/pages/plugins/index.mdx
Expand Up @@ -2,24 +2,19 @@ import { Cards } from 'nextra/components';
import Image from 'next/image';
import { faFileLines, faBook } from '@fortawesome/free-solid-svg-icons';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import {
faGithub,
faGitlab,
faVuejs,
} from '@fortawesome/free-brands-svg-icons';

# Related Plugins
# Child Plugins

Listed here are related plugins that can be used with **typedoc-plugin-markdown** to enhance the documentation experience.
Listed here are plugins that can be used with **typedoc-plugin-markdown** to enhance the documentation experience.

## Utils

Utility plugins that can be used to adjust the output of the markdown files.
Utility plugins that can be used to provide metadata or adjust the output of the markdown files.

<Cards num={2}>
<Cards.Card
title="typedoc-plugin-frontmatter"
icon={<FontAwesomeIcon icon={faFileLines} />}
title="Frontmatter"
icon={<FontAwesomeIcon icon={faBook} />}
arrow={true}
href="plugins/frontmatter"
/>
Expand All @@ -31,40 +26,42 @@ Utility plugins that can be used to adjust the output of the markdown files.
/>
</Cards>

## Themes
## Themes & Integrations

Theme plugins that can be used to adjust the output for specific platforms.
Plugins that can be used to integrate and target output for specific platforms.

<Cards num={2}>
<Cards.Card
title="docusaurus-plugin-typedoc"
icon={
<Image
src="/docusaurus-logo.svg"
alt="Docusaurus"
width={26}
height={26}
/>
}
arrow={true}
href="plugins/docusaurus"
/>
<Cards.Card
title="typedoc-vitepress-theme"
icon={<FontAwesomeIcon icon={faVuejs} />}
icon={
<Image src="/vuepress-logo.png" alt="VuePress" width={26} height={26} />
}
arrow={true}
href="plugins/vitepress"
/>
<Cards.Card
title="typedoc-github-wiki-theme"
icon={<FontAwesomeIcon icon={faGithub} />}
icon={<Image src="/github-logo.svg" alt="Gitlab" width={26} height={26} />}
arrow={true}
href="plugins/github-wiki"
/>
<Cards.Card
title="typedoc-gitlab-wiki-theme"
icon={<FontAwesomeIcon icon={faGitlab} />}
icon={<Image src="/gitlab-logo.png" alt="Gitlab" width={26} height={26} />}
arrow={true}
href="plugins/gitlab-wiki"
/>
</Cards>

## Integrations

Integration plugins that can be used to integrate with other tools.

<Cards num={2}>
<Cards.Card
title="docusaurus-plugin-typedoc"
icon={<FontAwesomeIcon icon={faBook} />}
arrow={true}
href="plugins/docusaurus"
/>
</Cards>
1 change: 1 addition & 0 deletions docs/public/docusaurus-logo.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
17 changes: 17 additions & 0 deletions docs/public/github-logo.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/public/gitlab-logo.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/public/vuepress-logo.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 38442e4

Please sign in to comment.