mirror of
https://github.com/facebook/docusaurus.git
synced 2025-04-28 17:57:48 +02:00
docs: clarify component naming for markdown import (#10545)
* docs: clarify component naming for markdown import (#10542) * Apply review suggestion Co-authored-by: Joshua Chen <sidachen2003@gmail.com> * Update website/docs/guides/markdown-features/markdown-features-react.mdx --------- Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
This commit is contained in:
parent
0794ebdd18
commit
0657e5806c
1 changed files with 1 additions and 1 deletions
|
@ -300,7 +300,7 @@ This feature is experimental and might be subject to breaking API changes in the
|
|||
|
||||
## Importing Markdown {#importing-markdown}
|
||||
|
||||
You can use Markdown files as components and import them elsewhere, either in Markdown files or in React pages.
|
||||
You can use Markdown files as components and import them elsewhere, either in Markdown files or in React pages. Each MDX file default-exports its page content as a React component. In the `import` statement, you can default-import this component with any name, but it must be capitalized following React's naming rules.
|
||||
|
||||
By convention, using the **`_` filename prefix** will not create any doc page and means the Markdown file is a **"partial"**, to be imported by other files.
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue