๐ฆ plugin-content-docs
Provides the Docs functionality and is the default docs plugin for Docusaurus.
Installationโ
- npm
- Yarn
- pnpm
npm install --save @docusaurus/plugin-content-docs
yarn add @docusaurus/plugin-content-docs
pnpm add @docusaurus/plugin-content-docs
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.
Configurationโ
์ค์ ํ ์ ์๋ ํ๋
์ต์ ๋ช | ํ์ | ๊ธฐ๋ณธ๊ฐ | ์ค๋ช |
---|---|---|---|
path | string | 'docs' | ์ฌ์ดํธ ๋๋ ํ ๋ฆฌ์ ์๋์ ์ธ ํ์ผ ์์คํ ์ ๋ฌธ์ ์ฝํ ์ธ ๋๋ ํ ๋ฆฌ ๊ฒฝ๋ก์ ๋๋ค. |
editUrl | string | EditUrlFunction | undefined | ์ฌ์ดํธ๋ฅผ ํธ์งํ๊ธฐ ์ํ Base URL์
๋๋ค. The final URL is computed by editUrl + relativeDocPath . ์ต์
์ฌ์ฉ ์ ๊ฐ ํ์ผ์ ๋ํ ์ธ๋ฐํ ์ ์ด๋ฅผ ํ ์ ์์ต๋๋ค. ํด๋น ํ๋๋ฅผ ์ค์ ํ์ง ์์ผ๋ฉด ํธ์ง ๋งํฌ๊ฐ ๋นํ์ฑํ๋ฉ๋๋ค. |
editLocalizedFiles | boolean | false | ํธ์ง URL์ ํ์งํ๋์ง ์์ ์๋ณธ ํ์ผ ๋์ ํ์งํ๋ ํ์ผ์ ๋์์ผ๋ก ํฉ๋๋ค. Ignored when editUrl is a function. |
editCurrentVersion | boolean | false | ํธ์ง URL์ ํญ์ ์ด์ ๋ฒ์ ๋์ ํ์ฌ ๋ฒ์ ๋ฌธ์๋ฅผ ๋์์ผ๋ก ํฉ๋๋ค. Ignored when editUrl is a function. |
routeBasePath | string | 'docs' | ์ฌ์ดํธ ๋ฌธ์ ์น์
์ ๋ํ URL ๋ผ์ฐํธ DO NOT include a trailing slash. Use / for shipping docs without base path. |
tagsBasePath | string | 'tags' | ์ฌ์ดํธ ํ๊ทธ ๋ชฉ๋ก ํ์ด์ง์ ๋ํ URL ๋ผ์ฐํธ It is prepended to the routeBasePath . |
include | string[] | ['**/*.{md,mdx}'] | ์ฝํ ์ธ ๊ฒฝ๋ก๋ฅผ ๊ธฐ์ค์ผ๋ก ๋น๋ํ ๋งํฌ๋ค์ด ํ์ผ๊ณผ ์ผ์นํ๋ glob ํจํด ๋ฐฐ์ด์ ๋๋ค. |
exclude | string[] | See example configuration | ์ ์ธํ ๋งํฌ๋ค์ด ํ์ผ๊ณผ ์ผ์นํ๋ glob ํจํด ๋ฐฐ์ด์
๋๋ค. Serves as refinement based on the include option. |
sidebarPath | false | string | undefined | ์ฌ์ด๋๋ฐ ๊ตฌ์ฑ ๊ฒฝ๋ก์
๋๋ค. Use false to disable sidebars, or undefined to create a fully autogenerated sidebar. |
sidebarCollapsible | boolean | true | ๊ธฐ๋ณธ์ ์ผ๋ก ์ฌ์ด๋๋ฐ ์นดํ ๊ณ ๋ฆฌ๋ฅผ ์ ์ ์ ์๋์ง ์ฌ๋ถ๋ฅผ ์ค์ ํฉ๋๋ค. See also Collapsible categories |
sidebarCollapsed | boolean | true | ๊ธฐ๋ณธ์ ์ผ๋ก ์ฌ์ด๋๋ฐ ์นดํ ๊ณ ๋ฆฌ๋ฅผ ์ ์์ง ์ฌ๋ถ๋ฅผ ์ค์ ํฉ๋๋ค. See also Expanded categories by default |
sidebarItemsGenerator | SidebarGenerator | Omitted | Function used to replace the sidebar items of type 'autogenerated' with real sidebar items (docs, categories, links...). See also Customize the sidebar items generator |
numberPrefixParser | boolean | PrefixParser | Omitted | ํ์ผ๋ช
์์ ์ซ์ ์ ๋์ฌ๋ฅผ ์ถ์ถํ๋ ์ฌ์ฉ์ ์ง์ ๊ตฌ๋ฌธ ๋ถ์ ๋ฐฉ์์ ์ค์ ํฉ๋๋ค. Use false to disable this behavior and leave the docs untouched, and true to use the default parser. See also Using number prefixes |
docsRootComponent | string | '@theme/DocsRoot' | ๋ชจ๋ ๋ฌธ์ ํ๋ฌ๊ทธ์ธ ํ์ด์ง(๋ชจ๋ ๋ฒ์ ํฌํจ)์ ์์ ์ปดํฌ๋ํธ์ ๋๋ค. ๋ฌธ์ ํ์ด์ง์ ๋ฒ์ ์ฌ์ด๋ฅผ ํ์ํ ๋ ๋ง์ดํธ๋ ์ํ๋ก ์ ์ง๋ฉ๋๋ค. |
docVersionRootComponent | string | '@theme/DocVersionLayout' | ๊ฐ๋ณ ๋ฒ์ ์ ๋ชจ๋ ๋ฌธ์ ํ์ด์ง(์ฌ์ด๋๋ฐ๊ฐ ์๋ ๋ฌธ์ ํ์ด์ง, ํ๊ทธ ํ์ด์ง)์ ์์ ์ปดํฌ๋ํธ์ ๋๋ค. ํน์ ๋ฒ์ ์ ํ์ด์ง ์ฌ์ด๋ฅผ ํ์ํ ๋ ๋ง์ดํธ๋ ์ํ๋ก ์ ์ง๋ฉ๋๋ค. |
docRootComponent | string | '@theme/DocRoot' | ์ฌ์ด๋๋ฐ๊ฐ ์๋ ๋ชจ๋ ๋ฌธ์ ํ์ด์ง(์ผ๋ฐ ๋ฌธ์ ํ์ด์ง, ์นดํ ๊ณ ๋ฆฌ ์์ฑ ์์ธ ํ์ด์ง)์ ์์ ์ปดํฌ๋ํธ์ ๋๋ค. ๊ฐ ํ์ด์ง ์ฌ์ด๋ฅผ ํ์ํ ๋ ๋ง์ดํธ๋ ์ํ๋ก ์ ์ง๋ฉ๋๋ค. |
docItemComponent | string | '@theme/DocItem' | ๋ชฉ์ฐจ, ํ์ด์ง ์์ญ ๋ฑ ๊ธฐ๋ณธ ๋ฌธ์ ์ปจํ ์ด๋ |
docTagsListComponent | string | '@theme/DocTagsListPage' | ํ๊ทธ ๋ชฉ๋ก ํ์ด์ง์ ๋ฃจํธ ์ปดํฌ๋ํธ |
docTagDocListComponent | string | '@theme/DocTagDocListPage' | "ํ๊ทธ X๋ฅผ ํฌํจํ ๋ฌธ์" ํ์ด์ง์ ๋ฃจํธ ์ปดํฌ๋ํธ |
docCategoryGeneratedIndexComponent | string | '@theme/DocCategoryGeneratedIndexPage' | ์์ฑ๋ ์นดํ ๊ณ ๋ฆฌ ์ธ๋ฑ์ค ํ์ด์ง์ ๋ฃจํธ ์ปดํฌ๋ํธ |
remarkPlugins | any[] | [] | MDX์ ์ ๋ฌ๋ Remark ํ๋ฌ๊ทธ์ธ |
rehypePlugins | any[] | [] | MDX์ ์ ๋ฌ๋ Rehype ํ๋ฌ๊ทธ์ธ |
rehypePlugins | any[] | [] | Recma plugins passed to MDX. |
beforeDefaultRemarkPlugins | any[] | [] | ๊ธฐ๋ณธ ๋ํ์ฌ์ฐ๋ฃจ์ค Remark ํ๋ฌ๊ทธ์ธ๋ณด๋ค ๋จผ์ MDX์ ์ ๋ฌ๋ ์ฌ์ฉ์ ์ง์ Remark ํ๋ฌ๊ทธ์ธ |
beforeDefaultRehypePlugins | any[] | [] | ๊ธฐ๋ณธ ๋ํ์ฌ์ฐ๋ฃจ์ค Rehype ํ๋ฌ๊ทธ์ธ๋ณด๋ค ๋จผ์ MDX์ ์ ๋ฌ๋ ์ฌ์ฉ์ ์ง์ Rehype ํ๋ฌ๊ทธ์ธ |
showLastUpdateAuthor | boolean | false | ๋ฌธ์๋ฅผ ๋ง์ง๋ง์ผ๋ก ์ ๋ฐ์ดํธํ ์์ฑ์๋ฅผ ํ์ํ ์ง ์ฌ๋ถ |
showLastUpdateTime | boolean | false | Whether to display the last date the doc was updated. This requires access to git history during the build, so will not work correctly with shallow clones (a common default for CI systems). With GitHub actions/checkout , usefetch-depth: 0 . |
breadcrumbs | boolean | true | ๋ฌธ์ ํ์ด์ง์์ ์ด๋ ๊ฒฝ๋ก๋ฅผ ํ์ฑํ ๋๋ ๋นํ์ฑํ |
disableVersioning | boolean | false | ์ฌ๋ฌ ๋ฒ์ ์ด ์๋๋ผ๋ ๋ช
์์ ์ผ๋ก ๋ฒ์ ๊ด๋ฆฌ๋ฅผ ๋นํ์ฑํํฉ๋๋ค. ์ด๋ ๊ฒ ํ๋ฉด ์ฌ์ดํธ์ ํ์ฌ ๋ฒ์ ๋ง ํฌํจ๋ฉ๋๋ค. Will error if includeCurrentVersion: false and disableVersioning: true . |
includeCurrentVersion | boolean | true | ๋ฌธ์์ ํ์ฌ ๋ฒ์ ์ ํฌํจ |
lastVersion | string | First version in versions.json | ๋ฌธ์ ๋ฉ๋ด๋ฐ ์์ดํ ์ ๋ํด ์ฐ์ ์ ์ผ๋ก ํ์๋๊ณ ๊ธฐ๋ณธ์ ์ผ๋ก ํ์๋๋ ๋ฒ์ |
onlyIncludeVersions | string[] | ์ฌ์ฉํ ์ ์๋ ๋ชจ๋ ๋ฒ์ | ์ฌ์ฉํ ์ ์๋ ๋ชจ๋ ๋ฒ์ ์ ํ์ ์งํฉ๋ง ํฌํจ |
versions | VersionsConfig | {} | ๊ฐ ๋ฒ์ ์ ์์ฑ์ ๋ ๋ฆฝ์ ์ผ๋ก ์ฌ์ฉ์ ์ง์ ํฉ๋๋ค. |
tags | string | false | null | undefined | tags.yml | Path to a YAML file listing pre-defined tags. Relative to the docs version content directories. |
onInlineTags | 'ignore' | 'log' | 'warn' | 'throw' | warn | The plugin behavior when docs contain inline tags (not appearing in the list of pre-defined tags, usually docs/tags.yml ). |
Typesโ
EditUrlFunction
โ
type EditUrlFunction = (params: {
version: string;
versionDocsDirPath: string;
docPath: string;
permalink: string;
locale: string;
}) => string | undefined;
PrefixParser
โ
type PrefixParser = (filename: string) => {
filename: string;
numberPrefix?: number;
};
SidebarGenerator
โ
type SidebarGenerator = (generatorArgs: {
/** The sidebar item with type "autogenerated" to be transformed. */
item: {type: 'autogenerated'; dirName: string};
/** Useful metadata for the version this sidebar belongs to. */
version: {contentPath: string; versionName: string};
/** All the docs of that version (unfiltered). */
docs: {
id: string;
title: string;
frontMatter: DocFrontMatter & Record<string, unknown>;
source: string;
sourceDirName: string;
sidebarPosition?: number | undefined;
}[];
/** Number prefix parser configured for this plugin. */
numberPrefixParser: PrefixParser;
/** The default category index matcher which you can override. */
isCategoryIndex: CategoryIndexMatcher;
/**
* key is the path relative to the doc content directory, value is the
* category metadata file's content.
*/
categoriesMetadata: {[filePath: string]: CategoryMetadata};
/**
* Useful to re-use/enhance the default sidebar generation logic from
* Docusaurus.
*/
defaultSidebarItemsGenerator: SidebarGenerator;
// Returns an array of sidebar items โ same as what you can declare in
// sidebars.js, except for shorthands. See https://docusaurus.io/docs/sidebar/items
}) => Promise<SidebarItem[]>;
type CategoryIndexMatcher = (param: {
/** The file name, without extension */
fileName: string;
/**
* The list of directories, from lowest level to highest.
* If there's no dir name, directories is ['.']
*/
directories: string[];
/** The extension, with a leading dot */
extension: string;
}) => boolean;
VersionsConfig
โ
type VersionConfig = {
/**
* The base path of the version, will be appended to `baseUrl` +
* `routeBasePath`.
*/
path?: string;
/** The label of the version to be used in badges, dropdowns, etc. */
label?: string;
/** The banner to show at the top of a doc of that version. */
banner?: 'none' | 'unreleased' | 'unmaintained';
/** Show a badge with the version label at the top of each doc. */
badge?: boolean;
/** Prevents search engines from indexing this version */
noIndex?: boolean;
/** Add a custom class name to the <html> element of each doc */
className?: string;
};
type VersionsConfig = {[versionName: string]: VersionConfig};
Example configurationโ
ํ๋ฆฌ์ ์ต์ ์ด๋ ํ๋ฌ๊ทธ์ธ ์ต์ ์์ ํ๋ฌ๊ทธ์ธ์ ์ค์ ํ ์ ์์ต๋๋ค.
๋๋ถ๋ถ์ ๋ํ์ฌ์ฐ๋ฃจ์ค ์ฌ์ฉ์๋ ํ๋ฆฌ์ ์ต์ ์ ์ฌ์ฉํด ํ๋ฌ๊ทธ์ธ์ ์ค์ ํฉ๋๋ค.
- ํ๋ฆฌ์ ์ต์
- ํ๋ฌ๊ทธ์ธ ์ต์
ํ๋ฆฌ์ ์ ์ฌ์ฉํ๋ ๊ฒฝ์ฐ ํ๋ฆฌ์ ์ต์ ๋ฅผ ํตํด ํ๋ฌ๊ทธ์ธ์ ๊ตฌ์ฑํฉ๋๋ค.
module.exports = {
presets: [
[
'@docusaurus/preset-classic',
{
docs: {
path: 'docs',
breadcrumbs: true,
// Simple use-case: string editUrl
// editUrl: 'https://github.com/facebook/docusaurus/edit/main/website/',
// Advanced use-case: functional editUrl
editUrl: ({versionDocsDirPath, docPath}) =>
`https://github.com/facebook/docusaurus/edit/main/website/${versionDocsDirPath}/${docPath}`,
editLocalizedFiles: false,
editCurrentVersion: false,
routeBasePath: 'docs',
include: ['**/*.md', '**/*.mdx'],
exclude: [
'**/_*.{js,jsx,ts,tsx,md,mdx}',
'**/_*/**',
'**/*.test.{js,jsx,ts,tsx}',
'**/__tests__/**',
],
sidebarPath: 'sidebars.js',
async sidebarItemsGenerator({
defaultSidebarItemsGenerator,
numberPrefixParser,
item,
version,
docs,
isCategoryIndex,
}) {
// Use the provided data to generate a custom sidebar slice
return [
{type: 'doc', id: 'intro'},
{
type: 'category',
label: 'Tutorials',
items: [
{type: 'doc', id: 'tutorial1'},
{type: 'doc', id: 'tutorial2'},
],
},
];
},
numberPrefixParser(filename) {
// Implement your own logic to extract a potential number prefix
const numberPrefix = findNumberPrefix(filename);
// Prefix found: return it with the cleaned filename
if (numberPrefix) {
return {
numberPrefix,
filename: filename.replace(prefix, ''),
};
}
// No number prefix found
return {numberPrefix: undefined, filename};
},
docsRootComponent: '@theme/DocsRoot',
docVersionRootComponent: '@theme/DocVersionRoot',
docRootComponent: '@theme/DocRoot',
docItemComponent: '@theme/DocItem',
remarkPlugins: [require('./my-remark-plugin')],
rehypePlugins: [],
beforeDefaultRemarkPlugins: [],
beforeDefaultRehypePlugins: [],
showLastUpdateAuthor: false,
showLastUpdateTime: false,
disableVersioning: false,
includeCurrentVersion: true,
lastVersion: undefined,
versions: {
current: {
label: 'Android SDK v2.0.0 (WIP)',
path: 'android-2.0.0',
banner: 'none',
},
'1.0.0': {
label: 'Android SDK v1.0.0',
path: 'android-1.0.0',
banner: 'unmaintained',
},
},
onlyIncludeVersions: ['current', '1.0.0', '2.0.0'],
},
},
],
],
};
๋ ๋ฆฝ์ ์ผ๋ก ์คํ๋๋ ํ๋ฌ๊ทธ์ธ์ ์ฌ์ฉํ๋ ๊ฒฝ์ฐ์๋ ํ๋ฌ๊ทธ์ธ์ ๋ํ ์ต์ ์ ์ง์ ์ค์ ํ ์ ์์ต๋๋ค.
module.exports = {
plugins: [
[
'@docusaurus/plugin-content-docs',
{
path: 'docs',
breadcrumbs: true,
// Simple use-case: string editUrl
// editUrl: 'https://github.com/facebook/docusaurus/edit/main/website/',
// Advanced use-case: functional editUrl
editUrl: ({versionDocsDirPath, docPath}) =>
`https://github.com/facebook/docusaurus/edit/main/website/${versionDocsDirPath}/${docPath}`,
editLocalizedFiles: false,
editCurrentVersion: false,
routeBasePath: 'docs',
include: ['**/*.md', '**/*.mdx'],
exclude: [
'**/_*.{js,jsx,ts,tsx,md,mdx}',
'**/_*/**',
'**/*.test.{js,jsx,ts,tsx}',
'**/__tests__/**',
],
sidebarPath: 'sidebars.js',
async sidebarItemsGenerator({
defaultSidebarItemsGenerator,
numberPrefixParser,
item,
version,
docs,
isCategoryIndex,
}) {
// Use the provided data to generate a custom sidebar slice
return [
{type: 'doc', id: 'intro'},
{
type: 'category',
label: 'Tutorials',
items: [
{type: 'doc', id: 'tutorial1'},
{type: 'doc', id: 'tutorial2'},
],
},
];
},
numberPrefixParser(filename) {
// Implement your own logic to extract a potential number prefix
const numberPrefix = findNumberPrefix(filename);
// Prefix found: return it with the cleaned filename
if (numberPrefix) {
return {
numberPrefix,
filename: filename.replace(prefix, ''),
};
}
// No number prefix found
return {numberPrefix: undefined, filename};
},
docsRootComponent: '@theme/DocsRoot',
docVersionRootComponent: '@theme/DocVersionRoot',
docRootComponent: '@theme/DocRoot',
docItemComponent: '@theme/DocItem',
remarkPlugins: [require('./my-remark-plugin')],
rehypePlugins: [],
beforeDefaultRemarkPlugins: [],
beforeDefaultRehypePlugins: [],
showLastUpdateAuthor: false,
showLastUpdateTime: false,
disableVersioning: false,
includeCurrentVersion: true,
lastVersion: undefined,
versions: {
current: {
label: 'Android SDK v2.0.0 (WIP)',
path: 'android-2.0.0',
banner: 'none',
},
'1.0.0': {
label: 'Android SDK v1.0.0',
path: 'android-1.0.0',
banner: 'unmaintained',
},
},
onlyIncludeVersions: ['current', '1.0.0', '2.0.0'],
},
],
],
};
Markdown front matterโ
Markdown documents can use the following Markdown front matter metadata fields, enclosed by a line ---
on either side.
์ค์ ํ ์ ์๋ ํ๋
์ต์ ๋ช | ํ์ | ๊ธฐ๋ณธ๊ฐ | ์ค๋ช |
---|---|---|---|
id | string | ํ์ผ ๊ฒฝ๋ก(ํ์ฅ์๋ ์ ์ธํ๊ณ ๋๋ ํฐ๋ฆฌ๋ ํฌํจ) | ๊ณ ์ ํ ๋ฌธ์ ID |
title | string | Markdown title or id | ๋ฌธ์ ์ ๋ชฉ์ ๋๋ค. ํ์ด์ง ๋ฉํ๋ฐ์ดํฐ๋ก ์ฌ์ฉํ๋ฉฐ ์ฌ๋ฌ ์์น(์ฌ์ด๋๋ฐ, ๋ค์/์ด์ ๋ฒํผ ๋ฑ)์์ ๋์ฒด๊ฐ์ผ๋ก ์ฌ์ฉ๋ฉ๋๋ค. ๋งํฌ๋ค์ด ์ ๋ชฉ์ด ์๋ ๊ฒฝ์ฐ ๋ฌธ์ ์๋จ์ ์๋์ผ๋ก ์ถ๊ฐ๋ฉ๋๋ค. |
pagination_label | string | sidebar_label or title | ๋ฌธ์ ๋ด์์ ๋ฌธ์์ ๋ค์/์ด์ ๋ฒํผ์ ํ์ํ ํ ์คํธ๋ฅผ ์ค์ ํฉ๋๋ค. |
sidebar_label | string | title | ๋ฌธ์ ๋ด์์ ๋ฌธ์์ ์ฌ์ด๋๋ฐ์ ํ์ํ ํ ์คํธ๋ฅผ ์ค์ ํฉ๋๋ค. |
sidebar_position | number | ๊ธฐ๋ณธ ์ ๋ ฌ ์์ | Controls the position of a doc inside the generated sidebar slice when using autogenerated sidebar items. See also Autogenerated sidebar metadata. |
sidebar_class_name | string | undefined | ์๋ ์์ฑ๋ ์ฌ์ด๋๋ฐ๋ฅผ ์ฌ์ฉํ ๋ ํด๋น ์ฌ์ด๋๋ฐ ๋ผ๋ฒจ์ ํน๋ณํ ํด๋์ค ์ด๋ฆ์ ์ ๊ณตํฉ๋๋ค. |
sidebar_custom_props | object | undefined | Assign custom props to the sidebar item referencing this doc |
displayed_sidebar | string | undefined | ํ์ฌ ๋ฌธ์๋ฅผ ํ์ํ ๋ ์ง์ ๋ ์ฌ์ด๋๋ฐ๋ฅผ ๊ฐ์ ๋ก ํ์ํฉ๋๋ค. Read the multiple sidebars guide for details. |
hide_title | boolean | false | ๋ฌธ์ ์๋จ ์ ๋ชฉ์ ์จ๊ธธ์ง ์ฌ๋ถ์ ๋๋ค. ํ๋ฐํธ ๋งคํฐ ์์ญ์์ ์ค์ ํ ์ ๋ชฉ๋ง ๊ฐ์ถฅ๋๋ค. ๋งํฌ๋ค์ด ๋ฌธ์ ๋ด์ ์ง์ ๋ ํ์ดํ์๋ ์ํฅ์ ์ฃผ์ง ์์ต๋๋ค. |
hide_table_of_contents | boolean | false | ๋ชฉ์ฐจ๋ฅผ ์ค๋ฅธ์ชฝ์ผ๋ก ์จ๊ธธ์ง ์ฌ๋ถ |
toc_min_heading_level | number | 2 | ๋ชฉ์ฐจ์ ํ์๋๋ ์ต์ ์ ๋ชฉ ์์ค์ ๋๋ค. 2์์ 6 ์ฌ์ด์ ๊ฐ์ผ๋ก ์ค์ ํ ์ ์๊ณ ์ต๋๊ฐ๋ณด๋ค ์๊ฑฐ๋ ๊ฐ์์ผ ํฉ๋๋ค. |
toc_max_heading_level | number | 3 | ๋ชฉ์ฐจ์ ํ์๋๋ ์ต๋ ์ ๋ชฉ ์์ค์ ๋๋ค. 2์์ 6 ์ฌ์ด์ ๊ฐ์ผ๋ก ์ค์ ํ ์ ์์ต๋๋ค. |
pagination_next | string | null | ์ฌ์ด๋๋ฐ์์ ๋ค์ ๋ฌธ์ | ํ์ด์ง ์ด๋ ์์ญ์์ "๋ค์" ํญ๋ชฉ ๋งํฌ์ ์ฐ๊ฒฐํ ๋ฌธ์์ ID์
๋๋ค. Use null to disable showing "Next" for this page. |
pagination_prev | string | null | ์ฌ์ด๋๋ฐ์์ ์ด์ ๋ฌธ์ | ํ์ด์ง ์ด๋ ์์ญ์์ "์ด์ " ํญ๋ชฉ ๋งํฌ์ ์ฐ๊ฒฐํ ๋ฌธ์์ ID์
๋๋ค. Use null to disable showing "Previous" for this page. |
parse_number_prefixes | boolean | numberPrefixParser plugin option | ๋ฌธ์์์ ๋ฒํธ ์ ๋์ฌ ๊ตฌ๋ฌธ ๋ถ์ ๋นํ์ฑํ ์ฌ๋ถ์ ๋๋ค. See also Using number prefixes. |
custom_edit_url | string | null | Computed using the editUrl plugin option | ๋ฌธ์๋ฅผ ํธ์งํ๊ธฐ ์ํ URL Use null to disable showing "Edit this page" for this page. |
keywords | string[] | undefined | ๊ฒ์ ์์ง์์ ํ์ํ ๋ฌธ์ ํ์ด์ง์ ํค์๋ ๋ฉํ ํ๊ทธ๋ฅผ ์ค์ ํฉ๋๋ค. |
description | string | ๋งํฌ๋ค์ด ์ฝํ ์ธ ์ฒซ ๋ฒ์งธ ์ค | The description of your document, which will become the <meta name="description" content="..."/> and <meta property="og:description" content="..."/> in <head> , used by search engines. |
image | string | undefined | Cover or thumbnail image that will be used as the <meta property="og:image" content="..."/> in the <head> , enhancing link previews on social media and messaging platforms. |
slug | string | ํ์ผ ๊ฒฝ๋ก | Allows to customize the document URL (/<routeBasePath>/<slug> ). Support multiple patterns: slug: my-doc , slug: /my/path/myDoc , slug: / . |
tags | Tag[] | undefined | A list of strings or objects of two string fields label and permalink to tag to your docs. Strings can be a reference to keys of a tags file (usually tags.yml ) |
draft | boolean | false | ๋น๊ณต๊ฐ ์ค์ ๋ฌธ์๋ ๊ฐ๋ฐ ์ํ์์๋ง ํ์ธํ ์ ์์ต๋๋ค. |
unlisted | boolean | false | ๋ชฉ๋ก์ ์๋ ๋ฌธ์๋ ๊ฐ๋ฐ ๋ฐ ์ ํ ์ํ์์ ๋ชจ๋ ํ์ธํ ์ ์์ต๋๋ค. ์ ํ์์ "์จ๊ฒจ์ง" ์ํ๋ผ ์ธ๋ฑ์ค๊ฐ ์์ฑ๋์ง ์๊ณ ์ฌ์ดํธ๋งต์์ ์ ์ธ๋๋ฉฐ ๋งํฌ ์ ๋ณด๋ฅผ ์๊ณ ์๋ ์ฌ์ฉ์๋ง ์ ๊ทผํ ์ ์์ต๋๋ค. |
last_update | FrontMatterLastUpdate | undefined | Allows overriding the last update author/date. Date can be any parsable date string. |
type FrontMatterLastUpdate = {date?: string; author?: string};
type Tag = string | {label: string; permalink: string};
์:
---
id: doc-markdown
title: Docs Markdown Features
hide_title: false
hide_table_of_contents: false
sidebar_label: Markdown
sidebar_position: 3
pagination_label: Markdown features
custom_edit_url: https://github.com/facebook/docusaurus/edit/main/docs/api-doc-markdown.md
description: How do I find you when I cannot solve this problem
keywords:
- docs
- docusaurus
tags: [docusaurus]
image: https://i.imgur.com/mErPwqL.png
slug: /myDoc
last_update:
date: 1/1/2000
author: custom author name
---
# Markdown Features
My Document Markdown content
Tags Fileโ
Use the tags
plugin option to configure the path of a YAML tags file.
By convention, the plugin will look for a tags.yml
file at the root of your content folder(s).
This file can contain a list of predefined tags. You can reference these tags by their keys in Markdown files thanks to the tags
front matter.
Using a tags file, you can ensure that your tags usage is consistent across your plugin content set. Use the onInlineTags: 'throw'
plugin option to enforce this consistency and prevent usage of inline tags declared on the fly.
Typesโ
The YAML content of the provided tags file should respect the following shape:
type Tag = {
label?: string; // Tag display label
permalink?: string; // Tag URL pathname segment
description?: string; // Tag description displayed in the tag page
};
type TagsFileInput = Record<string, Partial<Tag> | null>;
Exampleโ
releases:
label: 'Product releases'
permalink: '/product-releases'
description: 'Content related to product releases.'
# A partial tag definition is also valid
announcements:
label: 'Announcements'
# An empty tag definition is also valid
# Other attributes will be inferred from the key
emptyTag:
---
tags: [releases, announcements, emptyTag]
---
# Title
Content
i18nโ
Read the i18n introduction first.
Translation files locationโ
- Base path:
website/i18n/[locale]/docusaurus-plugin-content-docs
- Multi-instance path:
website/i18n/[locale]/docusaurus-plugin-content-docs-[pluginId]
- JSON files: extracted with
docusaurus write-translations
- Markdown files:
website/i18n/[locale]/docusaurus-plugin-content-docs/[versionName]
Example file-system structureโ
website/i18n/[locale]/docusaurus-plugin-content-docs
โ
โ # translations for website/docs
โโโ current
โ โโโ api
โ โ โโโ config.md
โ โโโ getting-started.md
โโโ current.json
โ
โ # translations for website/versioned_docs/version-1.0.0
โโโ version-1.0.0
โ โโโ api
โ โ โโโ config.md
โ โโโ getting-started.md
โโโ version-1.0.0.json