Skip to content

Commit

Permalink
Various improvements
Browse files Browse the repository at this point in the history
Signed-off-by: Josh-Cena <[email protected]>
  • Loading branch information
Josh-Cena committed Aug 27, 2021
1 parent 22eebea commit 54c51e1
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 6 deletions.
17 changes: 11 additions & 6 deletions website/docs/blog.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,8 @@ Blog post authors can be declared directly inside the FrontMatter:
values={[
{label: 'Single author', value: 'single'},
{label: 'Multiple authors', value: 'multiple'},
]}>
]}
groupId="author-frontmatter">
<TabItem value="single">
```yml title="my-blog-post.md"
Expand Down Expand Up @@ -225,16 +226,17 @@ This option works best to get started, or for casual, irregular authors.

Prefer usage of the `authors` FrontMatter, but the legacy `author_*` FrontMatter remains supported:

<!-- prettier-ignore -->
```yml title="my-blog-post.md"
---
author: Joel Marcey
author_title: Co-creator of Docusaurus 1
author_url: https://github.com/JoelMarcey
author_image_url: https://github.com/JoelMarcey.png
---

```

<!-- prettier-ignore -->
:::

### Global authors {#global-authors}
Expand Down Expand Up @@ -271,7 +273,8 @@ In blog posts FrontMatter, you can reference the authors declared in the global
values={[
{label: 'Single author', value: 'single'},
{label: 'Multiple authors', value: 'multiple'},
]}>
]}
groupId="author-frontmatter">
<TabItem value="single">

```yml title="my-blog-post.md"
Expand Down Expand Up @@ -302,6 +305,7 @@ The `authors` system is very flexible and can suit more advanced use-case:
You can use global authors most of the time, and still use inline authors:
<!-- prettier-ignore -->
```yml title="my-blog-post.md"
---
authors:
Expand All @@ -312,16 +316,17 @@ authors:
url: https://github.com/inlineAuthor
image_url: https://github.com/inlineAuthor
---
```
<!-- prettier-ignore -->
</details>
<details>
<summary>Local override of global authors</summary>
You can customize the global author's data on per-blog-post basis
You can customize the global author's data on per-blog-post basis:
<!-- prettier-ignore -->
```yml title="my-blog-post.md"
---
authors:
Expand All @@ -330,9 +335,9 @@ authors:
- key: slorber
name: Sébastien Lorber's new name
---
```
<!-- prettier-ignore -->
</details>
<details>
Expand Down
17 changes: 17 additions & 0 deletions website/docs/guides/docs/docs-create-doc.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -83,3 +83,20 @@ With <code>{#custom-id}</code> syntax you can set your own header id.
</BrowserWindow>
```

## Doc tags {#doc-tags}

Optionally, you can add tags to your doc pages, which introduces another dimension of categorization in addition to the [docs sidebar](./sidebar.md). Tags are passed in the front matter as a list of labels:

<!-- prettier-ignore -->
```yml "your-doc-page.md"
---
id: doc-with-tags
title: A doc with tags
tags:
- Demo
- Getting started
---
```

<!-- prettier-ignore -->

0 comments on commit 54c51e1

Please sign in to comment.