mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-09 15:17:23 +02:00
docs(v2): Docs refactoring and reorganization (#3831)
* stable refactor of plugins api documentation * plugins sidebar not collapsed by default as small? * theme docs reorg * Refactor migration guide doc * fix broken link
This commit is contained in:
parent
f43781ff41
commit
8f47babb46
31 changed files with 1529 additions and 1418 deletions
68
website/docs/api/plugins/plugin-content-pages.md
Normal file
68
website/docs/api/plugins/plugin-content-pages.md
Normal file
|
@ -0,0 +1,68 @@
|
|||
---
|
||||
id: plugin-content-pages
|
||||
title: '📦 plugin-content-pages'
|
||||
slug: '/api/plugins/@docusaurus/plugin-content-pages'
|
||||
---
|
||||
|
||||
The default pages plugin for Docusaurus. The classic template ships with this plugin with default configurations. This plugin provides [creating pages](guides/creating-pages.md) functionality.
|
||||
|
||||
## Installation
|
||||
|
||||
```bash npm2yarn
|
||||
npm install --save @docusaurus/plugin-content-pages
|
||||
```
|
||||
|
||||
:::tip
|
||||
|
||||
If you have installed `@docusaurus/preset-classic`, you don't need to install it as a dependency. You can also configure it through the [classic preset options](presets.md#docusauruspreset-classic) instead of doing it like below.
|
||||
|
||||
:::
|
||||
|
||||
## Configuration
|
||||
|
||||
```js title="docusaurus.config.js"
|
||||
module.exports = {
|
||||
plugins: [
|
||||
[
|
||||
'@docusaurus/plugin-content-pages',
|
||||
{
|
||||
/**
|
||||
* Path to data on filesystem
|
||||
* relative to site dir
|
||||
* components in this directory will be automatically converted to pages
|
||||
*/
|
||||
path: 'src/pages',
|
||||
/**
|
||||
* URL route for the page section of your site
|
||||
* do not include trailing slash
|
||||
*/
|
||||
routeBasePath: '',
|
||||
include: ['**/*.{js,jsx,ts,tsx,md,mdx}'],
|
||||
/**
|
||||
* No Route will be created for matching files
|
||||
*/
|
||||
exclude: [
|
||||
'**/_*.{js,jsx,ts,tsx,md,mdx}',
|
||||
'**/*.test.{js,ts}',
|
||||
'**/__tests__/**',
|
||||
],
|
||||
/**
|
||||
* Theme component used by markdown pages.
|
||||
*/
|
||||
mdxPageComponent: '@theme/MDXPage',
|
||||
/**
|
||||
* Remark and Rehype plugins passed to MDX
|
||||
*/
|
||||
remarkPlugins: [],
|
||||
rehypePlugins: [],
|
||||
/**
|
||||
* Custom Remark and Rehype plugins passed to MDX before
|
||||
* the default Docusaurus Remark and Rehype plugins.
|
||||
*/
|
||||
beforeDefaultRemarkPlugins: [],
|
||||
beforeDefaultRehypePlugins: [],
|
||||
},
|
||||
],
|
||||
],
|
||||
};
|
||||
```
|
Loading…
Add table
Add a link
Reference in a new issue