mirror of
https://github.com/facebook/docusaurus.git
synced 2025-04-29 02:08:36 +02:00
docs: blog + community + dogfood docs should use .mdx extension (#8507)
This commit is contained in:
parent
6eb40e0591
commit
3adc4ea809
100 changed files with 61 additions and 39 deletions
|
@ -11,7 +11,7 @@ tags: [paginated-tag]
|
|||
|
||||
import Content, {
|
||||
toc as ContentToc,
|
||||
} from '@site/_dogfooding/_partials/toc-tests.md';
|
||||
} from '@site/_dogfooding/_partials/toc-tests.mdx';
|
||||
|
||||
<Content />
|
||||
|
||||
|
|
|
@ -12,4 +12,4 @@ authors:
|
|||
|
||||
# Post with duplicate title
|
||||
|
||||
See https://github.com/facebook/docusaurus/issues/6059. This one and [2021-11-13-dup-title.md](./2021-11-13-dup-title.md) should both show up.
|
||||
See https://github.com/facebook/docusaurus/issues/6059. This one and [2021-11-13-dup-title.md](./2021-11-13-dup-title.mdx) should both show up.
|
|
@ -2,4 +2,4 @@
|
|||
|
||||
Inside folder with space
|
||||
|
||||
[doc 2](./doc%202.md)
|
||||
[doc 2](./doc%202.mdx)
|
|
@ -2,4 +2,4 @@
|
|||
|
||||
Inside folder with space
|
||||
|
||||
[doc 1](./doc%201.md)
|
||||
[doc 1](./doc%201.mdx)
|
|
@ -4,4 +4,4 @@ tags: [a, e, some-tag, some_tag]
|
|||
|
||||
# Another test page
|
||||
|
||||
[Test link](./folder%20with%20space/doc%201.md)
|
||||
[Test link](./folder%20with%20space/doc%201.mdx)
|
|
@ -18,12 +18,12 @@ In production, draft items shouldn't be accessible:
|
|||
|
||||
In production, unlisted items should remain accessible, but be hidden in the sidebar (unless currently browsed):
|
||||
|
||||
- [./only-unlisteds/unlisted1.md](./only-unlisteds/unlisted1.md)
|
||||
- [./only-unlisteds/unlisted2.md](./only-unlisteds/unlisted2.md)
|
||||
- [./only-unlisteds/unlisted-subcategory/unlisted3.md](./only-unlisteds/unlisted-subcategory/unlisted3.md)
|
||||
- [./some-unlisteds/unlisted1.md](./some-unlisteds/unlisted1.md)
|
||||
- [./some-unlisteds/unlisted2.md](./some-unlisteds/unlisted2.md)
|
||||
- [./some-unlisteds/unlisted-subcategory/unlisted3.md](./some-unlisteds/unlisted-subcategory/unlisted3.md)
|
||||
- [./only-unlisteds/unlisted1.md](./only-unlisteds/unlisted1.mdx)
|
||||
- [./only-unlisteds/unlisted2.md](./only-unlisteds/unlisted2.mdx)
|
||||
- [./only-unlisteds/unlisted-subcategory/unlisted3.md](./only-unlisteds/unlisted-subcategory/unlisted3.mdx)
|
||||
- [./some-unlisteds/unlisted1.md](./some-unlisteds/unlisted1.mdx)
|
||||
- [./some-unlisteds/unlisted2.md](./some-unlisteds/unlisted2.mdx)
|
||||
- [./some-unlisteds/unlisted-subcategory/unlisted3.md](./some-unlisteds/unlisted-subcategory/unlisted3.mdx)
|
||||
|
||||
---
|
||||
|
|
@ -5,7 +5,7 @@ toc_max_heading_level: 2
|
|||
|
||||
import Content, {
|
||||
toc as ContentToc,
|
||||
} from '@site/_dogfooding/_partials/toc-tests.md';
|
||||
} from '@site/_dogfooding/_partials/toc-tests.mdx';
|
||||
|
||||
<Content />
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@ toc_max_heading_level: 3
|
|||
|
||||
import Content, {
|
||||
toc as ContentToc,
|
||||
} from '@site/_dogfooding/_partials/toc-tests.md';
|
||||
} from '@site/_dogfooding/_partials/toc-tests.mdx';
|
||||
|
||||
<Content />
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@ toc_max_heading_level: 4
|
|||
|
||||
import Content, {
|
||||
toc as ContentToc,
|
||||
} from '@site/_dogfooding/_partials/toc-tests.md';
|
||||
} from '@site/_dogfooding/_partials/toc-tests.mdx';
|
||||
|
||||
<Content />
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@ toc_max_heading_level: 5
|
|||
|
||||
import Content, {
|
||||
toc as ContentToc,
|
||||
} from '@site/_dogfooding/_partials/toc-tests.md';
|
||||
} from '@site/_dogfooding/_partials/toc-tests.mdx';
|
||||
|
||||
<Content />
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@ toc_max_heading_level: 5
|
|||
|
||||
import Content, {
|
||||
toc as ContentToc,
|
||||
} from '@site/_dogfooding/_partials/toc-tests.md';
|
||||
} from '@site/_dogfooding/_partials/toc-tests.mdx';
|
||||
|
||||
<Content />
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@ toc_min_heading_level: 3
|
|||
|
||||
import Content, {
|
||||
toc as ContentToc,
|
||||
} from '@site/_dogfooding/_partials/toc-tests.md';
|
||||
} from '@site/_dogfooding/_partials/toc-tests.mdx';
|
||||
|
||||
<Content />
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@ toc_max_heading_level: 5
|
|||
|
||||
import Content, {
|
||||
toc as ContentToc,
|
||||
} from '@site/_dogfooding/_partials/toc-tests.md';
|
||||
} from '@site/_dogfooding/_partials/toc-tests.mdx';
|
||||
|
||||
<Content />
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@ toc_max_heading_level: 5
|
|||
|
||||
import Content, {
|
||||
toc as ContentToc,
|
||||
} from '@site/_dogfooding/_partials/toc-tests.md';
|
||||
} from '@site/_dogfooding/_partials/toc-tests.mdx';
|
||||
|
||||
<Content />
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@ toc_max_heading_level: 5
|
|||
|
||||
import Content, {
|
||||
toc as ContentToc,
|
||||
} from '@site/_dogfooding/_partials/toc-tests.md';
|
||||
} from '@site/_dogfooding/_partials/toc-tests.mdx';
|
||||
|
||||
<Content />
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
import Content, {
|
||||
toc as ContentToc,
|
||||
} from '@site/_dogfooding/_partials/toc-tests.md';
|
||||
} from '@site/_dogfooding/_partials/toc-tests.mdx';
|
||||
|
||||
<Content />
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
Let's import a MDX partial at `./_pagePartial.md`:
|
||||
|
||||
```mdx-code-block
|
||||
import PagePartial from "./_pagePartial.md"
|
||||
import PagePartial from "./_pagePartial.mdx"
|
||||
|
||||
<PagePartial />
|
||||
```
|
||||
|
@ -13,7 +13,7 @@ import PagePartial from "./_pagePartial.md"
|
|||
Now let's import `../README.md`:
|
||||
|
||||
```mdx-code-block
|
||||
import Readme from "../README.md"
|
||||
import Readme from "../README.mdx"
|
||||
|
||||
<Readme />
|
||||
```
|
|
@ -34,7 +34,17 @@ import Tabs from '@theme/Tabs';
|
|||
|
||||
import TabItem from '@theme/TabItem';
|
||||
|
||||
<Tabs defaultValue="apple" values={[ {label: 'Apple', value: 'apple'}, {label: 'Orange', value: 'orange'}, {label: 'Banana', value: 'banana'} ]}><TabItem value="apple">This is an apple 🍎</TabItem><TabItem value="orange">This is an orange 🍊</TabItem><TabItem value="banana">This is a banana 🍌</TabItem></Tabs>
|
||||
<Tabs
|
||||
defaultValue="apple"
|
||||
values={[
|
||||
{label: 'Apple', value: 'apple'},
|
||||
{label: 'Orange', value: 'orange'},
|
||||
{label: 'Banana', value: 'banana'},
|
||||
]}>
|
||||
<TabItem value="apple">This is an apple 🍎</TabItem>
|
||||
<TabItem value="orange">This is an orange 🍊</TabItem>
|
||||
<TabItem value="banana">This is a banana 🍌</TabItem>
|
||||
</Tabs>
|
||||
|
||||
## Comments
|
||||
|
||||
|
@ -58,7 +68,7 @@ My comment
|
|||
|
||||
## Import code block from source code file
|
||||
|
||||
import MyComponent from "@site/src/pages/examples/\_myComponent"
|
||||
import MyComponent from '@site/src/pages/examples/_myComponent';
|
||||
|
||||
import BrowserWindow from '@site/src/components/BrowserWindow';
|
||||
|
||||
|
@ -74,7 +84,7 @@ import MyComponent from './myComponent';
|
|||
|
||||
<BrowserWindow>
|
||||
|
||||
<MyComponent/>
|
||||
<MyComponent />
|
||||
|
||||
</BrowserWindow>
|
||||
|
||||
|
@ -88,9 +98,9 @@ import MyComponentSource from '!!raw-loader!./myComponent';
|
|||
<CodeBlock className="language-jsx">{MyComponentSource}</CodeBlock>;
|
||||
```
|
||||
|
||||
import CodeBlock from "@theme/CodeBlock"
|
||||
import CodeBlock from '@theme/CodeBlock';
|
||||
|
||||
import MyComponentSource from '!!raw-loader!@site/src/pages/examples/\_myComponent';
|
||||
import MyComponentSource from '!!raw-loader!@site/src/pages/examples/_myComponent';
|
||||
|
||||
<BrowserWindow>
|
||||
|
|
@ -5,7 +5,7 @@ toc_max_heading_level: 4
|
|||
|
||||
import Content, {
|
||||
toc as ContentToc,
|
||||
} from '@site/_dogfooding/_partials/toc-tests.md';
|
||||
} from '@site/_dogfooding/_partials/toc-tests.mdx';
|
||||
|
||||
<Content />
|
||||
|
||||
|
|
|
@ -129,7 +129,7 @@ build
|
|||
|
||||

|
||||
|
||||
We welcome your [contributions](https://github.com/facebook/docusaurus/blob/master/CONTRIBUTING.md) to Docusaurus, whether you want to use it for your own site, you want to [contribute](https://github.com/facebook/docusaurus/blob/master/CONTRIBUTING.md) to the Docusaurus core or just have questions. Follow us on [GitHub](https://github.com/facebook/docusaurus) and [Twitter](https://twitter.com/docusaurus).
|
||||
We welcome your [contributions](https://github.com/facebook/docusaurus/blob/master/CONTRIBUTING.mdx) to Docusaurus, whether you want to use it for your own site, you want to [contribute](https://github.com/facebook/docusaurus/blob/master/CONTRIBUTING.mdx) to the Docusaurus core or just have questions. Follow us on [GitHub](https://github.com/facebook/docusaurus) and [Twitter](https://twitter.com/docusaurus).
|
||||
|
||||
## Acknowledgements
|
||||
|
|
@ -18,7 +18,19 @@ There is a saying that the very best software is constantly evolving, and the ve
|
|||
|
||||
It all started with this [RFC issue](https://github.com/facebook/docusaurus/issues/789) opened by [Yangshun](https://github.com/yangshun) towards the end of June 2018.
|
||||
|
||||
<blockquote><h4><a href="https://github.com/facebook/docusaurus/issues/789">[RFC] Docusaurus v2 · Issue #789 · facebook/docusaurus</a></h4><p>These are some of the problems I'm seeing in Docusaurus now and also how we can address them in v2. A number of the ideas here were inspired by VuePress and other static site generators. In the current static site generators ecosystem, t...</p></blockquote>
|
||||
<blockquote>
|
||||
<h4>
|
||||
<a href="https://github.com/facebook/docusaurus/issues/789">
|
||||
[RFC] Docusaurus v2 · Issue #789 · facebook/docusaurus
|
||||
</a>
|
||||
</h4>
|
||||
<p>
|
||||
These are some of the problems I'm seeing in Docusaurus now and also how we
|
||||
can address them in v2. A number of the ideas here were inspired by VuePress
|
||||
and other static site generators. In the current static site generators
|
||||
ecosystem, t...
|
||||
</p>
|
||||
</blockquote>
|
||||
|
||||
Most of the suggested improvements are mentioned in the issue; I will provide details on some of issues in Docusaurus 1 and how we are going to address them in Docusaurus 2.
|
||||
|
|
@ -7,7 +7,7 @@ image: ./img/thumbnail.png
|
|||
|
||||
Docusaurus has made great progress in 2021! We've seen a lot of traction and just crossed **30k stars on GitHub**!
|
||||
|
||||
We've **reached full feature parity** with v1 after [the release of internationalization](../2021-03-09-releasing-docusaurus-i18n.md), [announced our **first beta**](../2021-05-12-announcing-docusaurus-two-beta/index.md), and welcomed **significantly more users** this year.
|
||||
We've **reached full feature parity** with v1 after [the release of internationalization](../2021-03-09-releasing-docusaurus-i18n.mdx), [announced our **first beta**](../2021-05-12-announcing-docusaurus-two-beta/index.mdx), and welcomed **significantly more users** this year.
|
||||
|
||||
The **official v2 release** is just around the corner! Follow the [roadmap issue](https://github.com/facebook/docusaurus/issues/6113) for any latest news.
|
||||
|
||||
|
@ -17,7 +17,7 @@ The **official v2 release** is just around the corner! Follow the [roadmap issue
|
|||
|
||||
## Highlights
|
||||
|
||||
Let's begin by going over a few highlights this year. Remember the [todo-list](../2021-05-12-announcing-docusaurus-two-beta/index.md#whats-next) from half a year ago? Time to take it out again and see how far we've come!
|
||||
Let's begin by going over a few highlights this year. Remember the [todo-list](../2021-05-12-announcing-docusaurus-two-beta/index.mdx#whats-next) from half a year ago? Time to take it out again and see how far we've come!
|
||||
|
||||
- **Internationalization**: officially released four months after its initial landing in late 2020. Seen great success in [many projects](/showcase?tags=i18n)
|
||||
- **Autogenerated sidebars**: no need to maintain a big `sidebars.js` anymore
|
||||
|
@ -118,7 +118,7 @@ We'd like to express our gratitude to [all the contributors in 2021](https://git
|
|||
|
||||
- The core team: [Alexey Pyltsyn](https://github.com/lex111), [Sébastien Lorber](https://github.com/slorber), [Joshua Chen](https://github.com/Josh-Cena), and [Yangshun Tay](https://github.com/yangshun) for moderating the community, publicizing Docusaurus, triaging issues, and implementing new features
|
||||
- [Joel Marcey](https://github.com/JoelMarcey) for creating Docusaurus and supporting its development all along
|
||||
- The Algolia team for helping Docusaurus users [migrate to the new DocSearch](../2021-11-21-algolia-docsearch-migration/index.md) and answering search-related questions
|
||||
- The Algolia team for helping Docusaurus users [migrate to the new DocSearch](../2021-11-21-algolia-docsearch-migration/index.mdx) and answering search-related questions
|
||||
- All the active community members for making valuable code contributions, improving our documentation, and answering questions on Discord
|
||||
|
||||
So long, 2021, and let's greet a great 2022!
|
|
@ -95,7 +95,7 @@ Docusaurus was created at **Facebook Open Source** in **2017** (now [Meta Open S
|
|||
|
||||
At that time, our solution was to **copy/paste a Jekyll template** over and over again. This naturally became **hard to maintain**, so we created a tool to **solve our own pain** once for all.
|
||||
|
||||
**[Docusaurus v1 was born](../2017-12-14-introducing-docusaurus.md)!**
|
||||
**[Docusaurus v1 was born](../2017-12-14-introducing-docusaurus.mdx)!**
|
||||
|
||||

|
||||
|
||||
|
@ -129,7 +129,7 @@ Notice that the sample sites above use different colors, but still look quite th
|
|||
- We kept **everything good from v1**: docs, blog, pages, versioning, i18n...
|
||||
- We implemented **several new features**
|
||||
|
||||
More details in the [Docusaurus 2 project announcement](../2018-09-11-Towards-Docusaurus-2.md) and [v1 to v2 migration guide](https://docusaurus.io/docs/migration)
|
||||
More details in the [Docusaurus 2 project announcement](../2018-09-11-Towards-Docusaurus-2.mdx) and [v1 to v2 migration guide](https://docusaurus.io/docs/migration)
|
||||
|
||||
## Who uses Docusaurus 2.0?
|
||||
|
||||
|
@ -420,7 +420,7 @@ We'd like to express our gratitude to [all our contributors](https://github.com/
|
|||
- [Joel Marcey](https://github.com/JoelMarcey) for creating Docusaurus 1.0 and supporting the Docusaurus 2.0 project at Meta Open Source
|
||||
- [Paul O’Shannessy](https://github.com/zpao) for supporting the development of all the next versions of Docusaurus at Meta Open Source
|
||||
- [Eric Nakagawa](https://github.com/ericnakagawa) for creating our cutest mascot Slash
|
||||
- [Endilie Yacop Sucipto](https://github.com/endiliey) for his significant [initial work on Docusaurus v2](../2020-01-07-tribute-to-endi.md)
|
||||
- [Endilie Yacop Sucipto](https://github.com/endiliey) for his significant [initial work on Docusaurus v2](../2020-01-07-tribute-to-endi.mdx)
|
||||
- [Clément Vannicatte](https://github.com/shortcuts), [Kevin Granger](https://github.com/Shipow) and the whole Algolia team for their support
|
||||
- All the community members for making valuable code contributions, improving our documentation, and answering questions on [Discord](https://discordapp.com/invite/docusaurus)
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@ import {
|
|||
|
||||
Docusaurus has a canary releases system.
|
||||
|
||||
It permits you to **test new unreleased features** as soon as the pull requests are merged on the [next version](./5-release-process.md#next-version) of Docusaurus.
|
||||
It permits you to **test new unreleased features** as soon as the pull requests are merged on the [next version](./5-release-process.mdx#next-version) of Docusaurus.
|
||||
|
||||
It is a good way to **give feedback to maintainers**, ensuring the newly implemented feature works as intended.
|
||||
|
|
@ -113,7 +113,7 @@ There are 3 ways to use the next version:
|
|||
|
||||
- with an `alpha`, `beta` or `rc` pre-release
|
||||
- with the `@next` npm dist tag for the latest pre-release
|
||||
- with a [canary release](./4-canary.md) for the very latest features
|
||||
- with a [canary release](./4-canary.mdx) for the very latest features
|
||||
|
||||
:::tip
|
||||
|
Loading…
Add table
Reference in a new issue