๐ฆ plugin-content-pages
๋ํ์ฌ์ฐ๋ฃจ์ค์ ๊ธฐ๋ณธ ํ์ด์ง ํ๋ฌ๊ทธ์ธ์ ๋๋ค. ํด๋์ ํ ํ๋ฆฟ์๋ ๊ธฐ๋ณธ ์ค์ ์ผ๋ก ํ๋ฌ๊ทธ์ธ์ด ํฌํจ๋์ด ์์ต๋๋ค. ํ์ด์ง ๋ง๋ค๊ธฐ ๊ธฐ๋ฅ์ ์ ๊ณตํ๋ ํ๋ฌ๊ทธ์ธ์ ๋๋ค.
#
์ค์น- npm
- Yarn
npm install --save @docusaurus/plugin-content-pages
yarn add @docusaurus/plugin-content-pages
tip
If you use the preset @docusaurus/preset-classic
, you don't need to install this plugin as a dependency.
You can configure this plugin through the preset options.
#
์ค์ ์ค์ ํ ์ ์๋ ํ๋
Name | Type | Default | Description |
---|---|---|---|
path | string | 'src/pages' | Path to data on filesystem relative to site dir. Components in this directory will be automatically converted to pages. |
routeBasePath | string | '/' | URL route for the pages section of your site. DO NOT include a trailing slash. |
include | string[] | ['**/*.{js,jsx,ts,tsx,md,mdx}'] | Matching files will be included and processed. |
exclude | string[] | See example configuration | No route will be created for matching files. |
mdxPageComponent | string | '@theme/MDXPage' | Component used by each MDX page. |
remarkPlugins | [] | any[] | Remark plugins passed to MDX. |
rehypePlugins | [] | any[] | Rehype plugins passed to MDX. |
beforeDefaultRemarkPlugins | any[] | [] | Custom Remark plugins passed to MDX before the default Docusaurus Remark plugins. |
beforeDefaultRehypePlugins | any[] | [] | Custom Rehype plugins passed to MDX before the default Docusaurus Rehype plugins. |
#
์ค์ ์์Here's an example configuration object.
You can provide it as preset options or plugin options.
tip
Most Docusaurus users configure this plugin through the preset options.
const config = { path: 'src/pages', routeBasePath: '', include: ['**/*.{js,jsx,ts,tsx,md,mdx}'], exclude: [ '**/_*.{js,jsx,ts,tsx,md,mdx}', '**/_*/**', '**/*.test.{js,jsx,ts,tsx}', '**/__tests__/**', ], mdxPageComponent: '@theme/MDXPage', remarkPlugins: [require('remark-math')], rehypePlugins: [], beforeDefaultRemarkPlugins: [], beforeDefaultRehypePlugins: [],};
#
Preset optionsIf you use a preset, configure this plugin through the preset options:
module.exports = { presets: [ [ '@docusaurus/preset-classic', { pages: { path: 'src/pages', // ... configuration object here }, }, ], ],};
#
Plugin optionsIf you are using a standalone plugin, provide options directly to the plugin:
module.exports = { plugins: [ [ '@docusaurus/plugin-content-pages', { path: 'src/pages', // ... configuration object here }, ], ],};
#
i18ni18n ์๊ฐ ๋ฌธ์๋ฅผ ๋จผ์ ํ์ธํด์ฃผ์ธ์.
#
๋ฒ์ญ ํ์ผ ์์น- ๊ธฐ๋ณธ ๊ฒฝ๋ก:
website/i18n/<locale>/docusaurus-plugin-content-pages
- ๋ฉํฐ ์ธ์คํด์ค ๊ฒฝ๋ก:
website/i18n/<locale>/docusaurus-plugin-content-pages-<pluginId>
- JSON ํ์ผ:
docusaurus write-translations
๋ช ๋ น ์คํ ํ ๋ง๋ค์ด์ง ํ์ผ - ๋งํฌ๋ค์ด ํ์ผ:
website/i18n/<locale>/docusaurus-plugin-content-pages
#
ํ์ผ ์์คํ ๊ตฌ์กฐ ์website/i18n/<locale>/docusaurus-plugin-content-pagesโโ # translations for website/src/pagesโโโ first-markdown-page.mdโโโ second-markdown-page.md