๋ฉ”์ธ ์ปจํ…์ธ ๋กœ ์ด๋™
๋ฒ„์ „: 2.x

๐Ÿ“ฆ plugin-content-docs

Provides the Docs functionality and is the default docs plugin for Docusaurus.

Installationโ€‹

npm install --save @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โ€‹

์„ค์ •ํ•  ์ˆ˜ ์žˆ๋Š” ํ•„๋“œ

์˜ต์…˜๋ช…ํƒ€์ž…๊ธฐ๋ณธ๊ฐ’์„ค๋ช…
pathstring'docs'์‚ฌ์ดํŠธ ๋””๋ ‰ํ† ๋ฆฌ์— ์ƒ๋Œ€์ ์ธ ํŒŒ์ผ ์‹œ์Šคํ…œ์˜ ๋ฌธ์„œ ์ฝ˜ํ…์ธ  ๋””๋ ‰ํ† ๋ฆฌ ๊ฒฝ๋กœ์ž…๋‹ˆ๋‹ค.
editUrlstring | EditUrlFunctionundefined์‚ฌ์ดํŠธ๋ฅผ ํŽธ์ง‘ํ•˜๊ธฐ ์œ„ํ•œ Base URL์ž…๋‹ˆ๋‹ค. The final URL is computed by editUrl + relativeDocPath. ์˜ต์…˜ ์‚ฌ์šฉ ์‹œ ๊ฐ ํŒŒ์ผ์— ๋Œ€ํ•œ ์„ธ๋ฐ€ํ•œ ์ œ์–ด๋ฅผ ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ํ•ด๋‹น ํ•„๋“œ๋ฅผ ์„ค์ •ํ•˜์ง€ ์•Š์œผ๋ฉด ํŽธ์ง‘ ๋งํฌ๊ฐ€ ๋น„ํ™œ์„ฑํ™”๋ฉ๋‹ˆ๋‹ค.
editLocalizedFilesbooleanfalseํŽธ์ง‘ URL์€ ํ˜„์ง€ํ™”๋˜์ง€ ์•Š์€ ์›๋ณธ ํŒŒ์ผ ๋Œ€์‹  ํ˜„์ง€ํ™”๋œ ํŒŒ์ผ์„ ๋Œ€์ƒ์œผ๋กœ ํ•ฉ๋‹ˆ๋‹ค. Ignored when editUrl is a function.
editCurrentVersionbooleanfalseํŽธ์ง‘ URL์€ ํ•ญ์ƒ ์ด์ „ ๋ฒ„์ „ ๋Œ€์‹  ํ˜„์žฌ ๋ฒ„์ „ ๋ฌธ์„œ๋ฅผ ๋Œ€์ƒ์œผ๋กœ ํ•ฉ๋‹ˆ๋‹ค. Ignored when editUrl is a function.
routeBasePathstring'docs'์‚ฌ์ดํŠธ ๋ฌธ์„œ ์„น์…˜์— ๋Œ€ํ•œ URL ๋ผ์šฐํŠธ DO NOT include a trailing slash. Use / for shipping docs without base path.
tagsBasePathstring'tags'์‚ฌ์ดํŠธ ํƒœ๊ทธ ๋ชฉ๋ก ํŽ˜์ด์ง€์— ๋Œ€ํ•œ URL ๋ผ์šฐํŠธ It is prepended to the routeBasePath.
includestring[]['**/*.{md,mdx}']์ฝ˜ํ…์ธ  ๊ฒฝ๋กœ๋ฅผ ๊ธฐ์ค€์œผ๋กœ ๋นŒ๋“œํ•  ๋งˆํฌ๋‹ค์šด ํŒŒ์ผ๊ณผ ์ผ์น˜ํ•˜๋Š” glob ํŒจํ„ด ๋ฐฐ์—ด์ž…๋‹ˆ๋‹ค.
excludestring[]See example configuration์ œ์™ธํ•  ๋งˆํฌ๋‹ค์šด ํŒŒ์ผ๊ณผ ์ผ์น˜ํ•˜๋Š” glob ํŒจํ„ด ๋ฐฐ์—ด์ž…๋‹ˆ๋‹ค. Serves as refinement based on the include option.
sidebarPathfalse | stringundefined์‚ฌ์ด๋“œ๋ฐ” ๊ตฌ์„ฑ ๊ฒฝ๋กœ์ž…๋‹ˆ๋‹ค. Use false to disable sidebars, or undefined to create a fully autogenerated sidebar.
sidebarCollapsiblebooleantrue๊ธฐ๋ณธ์ ์œผ๋กœ ์‚ฌ์ด๋“œ๋ฐ” ์นดํ…Œ๊ณ ๋ฆฌ๋ฅผ ์ ‘์„ ์ˆ˜ ์žˆ๋Š”์ง€ ์—ฌ๋ถ€๋ฅผ ์„ค์ •ํ•ฉ๋‹ˆ๋‹ค. See also Collapsible categories
sidebarCollapsedbooleantrue๊ธฐ๋ณธ์ ์œผ๋กœ ์‚ฌ์ด๋“œ๋ฐ” ์นดํ…Œ๊ณ ๋ฆฌ๋ฅผ ์ ‘์„์ง€ ์—ฌ๋ถ€๋ฅผ ์„ค์ •ํ•ฉ๋‹ˆ๋‹ค. See also Expanded categories by default
sidebarItemsGeneratorSidebarGeneratorOmittedFunction used to replace the sidebar items of type 'autogenerated' with real sidebar items (docs, categories, links...). See also Customize the sidebar items generator
numberPrefixParserboolean | PrefixParserOmittedํŒŒ์ผ๋ช…์—์„œ ์ˆซ์ž ์ ‘๋‘์‚ฌ๋ฅผ ์ถ”์ถœํ•˜๋Š” ์‚ฌ์šฉ์ž ์ง€์ • ๊ตฌ๋ฌธ ๋ถ„์„ ๋ฐฉ์‹์„ ์„ค์ •ํ•ฉ๋‹ˆ๋‹ค. Use false to disable this behavior and leave the docs untouched, and true to use the default parser. See also Using number prefixes
docLayoutComponentstring'@theme/DocPage'๊ฐ ๋ฌธ์„œ ํŽ˜์ด์ง€์˜ ๋ฃจํŠธ ๋ ˆ์ด์•„์›ƒ ์ปดํฌ๋„ŒํŠธ์ž…๋‹ˆ๋‹ค. ๋ฒ„์ „ ๋ฐ์ดํ„ฐ ์ปจํ…์ŠคํŠธ๋ฅผ ์ œ๊ณตํ•˜๋ฉฐ ๋ฌธ์„œ ์ „ํ™˜ ์‹œ ๋งˆ์šดํŠธ ํ•ด์ œ๋˜์ง€ ์•Š์Šต๋‹ˆ๋‹ค.
docItemComponentstring'@theme/DocItem'๋ชฉ์ฐจ, ํŽ˜์ด์ง€ ์˜์—ญ ๋“ฑ ๊ธฐ๋ณธ ๋ฌธ์„œ ์ปจํ…Œ์ด๋„ˆ
docTagsListComponentstring'@theme/DocTagsListPage'ํƒœ๊ทธ ๋ชฉ๋ก ํŽ˜์ด์ง€์˜ ๋ฃจํŠธ ์ปดํฌ๋„ŒํŠธ
docTagDocListComponentstring'@theme/DocTagDocListPage'"ํƒœ๊ทธ X๋ฅผ ํฌํ•จํ•œ ๋ฌธ์„œ" ํŽ˜์ด์ง€์˜ ๋ฃจํŠธ ์ปดํฌ๋„ŒํŠธ
docCategoryGeneratedIndexComponentstring'@theme/DocCategoryGeneratedIndexPage'์ƒ์„ฑ๋œ ์นดํ…Œ๊ณ ๋ฆฌ ์ธ๋ฑ์Šค ํŽ˜์ด์ง€์˜ ๋ฃจํŠธ ์ปดํฌ๋„ŒํŠธ
remarkPluginsany[][]MDX์— ์ „๋‹ฌ๋œ Remark ํ”Œ๋Ÿฌ๊ทธ์ธ
rehypePluginsany[][]MDX์— ์ „๋‹ฌ๋œ Rehype ํ”Œ๋Ÿฌ๊ทธ์ธ
beforeDefaultRemarkPluginsany[][]๊ธฐ๋ณธ ๋„ํ์‚ฌ์šฐ๋ฃจ์Šค Remark ํ”Œ๋Ÿฌ๊ทธ์ธ๋ณด๋‹ค ๋จผ์ € MDX์— ์ „๋‹ฌ๋œ ์‚ฌ์šฉ์ž ์ง€์ • Remark ํ”Œ๋Ÿฌ๊ทธ์ธ
beforeDefaultRehypePluginsany[][]๊ธฐ๋ณธ ๋„ํ์‚ฌ์šฐ๋ฃจ์Šค Rehype ํ”Œ๋Ÿฌ๊ทธ์ธ๋ณด๋‹ค ๋จผ์ € MDX์— ์ „๋‹ฌ๋œ ์‚ฌ์šฉ์ž ์ง€์ • Rehype ํ”Œ๋Ÿฌ๊ทธ์ธ
showLastUpdateAuthorbooleanfalse๋ฌธ์„œ๋ฅผ ๋งˆ์ง€๋ง‰์œผ๋กœ ์—…๋ฐ์ดํŠธํ•œ ์ž‘์„ฑ์ž๋ฅผ ํ‘œ์‹œํ• ์ง€ ์—ฌ๋ถ€
showLastUpdateTimebooleanfalseWhether to display the last date the doc was updated.
disableVersioningbooleanfalse์—ฌ๋Ÿฌ ๋ฒ„์ „์ด ์žˆ๋”๋ผ๋„ ๋ช…์‹œ์ ์œผ๋กœ ๋ฒ„์ „ ๊ด€๋ฆฌ๋ฅผ ๋น„ํ™œ์„ฑํ™”ํ•ฉ๋‹ˆ๋‹ค. ์ด๋ ‡๊ฒŒ ํ•˜๋ฉด ์‚ฌ์ดํŠธ์— ํ˜„์žฌ ๋ฒ„์ „๋งŒ ํฌํ•จ๋ฉ๋‹ˆ๋‹ค. Will error if includeCurrentVersion: false and disableVersioning: true.
includeCurrentVersionbooleantrue๋ฌธ์„œ์˜ ํ˜„์žฌ ๋ฒ„์ „์„ ํฌํ•จ
lastVersionstringFirst version in versions.json๋ฌธ์„œ ๋ฉ”๋‰ด๋ฐ” ์•„์ดํ…œ์— ๋Œ€ํ•ด ์šฐ์„ ์ ์œผ๋กœ ํƒ์ƒ‰๋˜๊ณ  ๊ธฐ๋ณธ์ ์œผ๋กœ ํ‘œ์‹œ๋˜๋Š” ๋ฒ„์ „
onlyIncludeVersionsstring[]์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ๋Š” ๋ชจ๋“  ๋ฒ„์ „์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ๋Š” ๋ชจ๋“  ๋ฒ„์ „์˜ ํ•˜์œ„ ์ง‘ํ•ฉ๋งŒ ํฌํ•จ
versionsVersionsConfig{}๊ฐ ๋ฒ„์ „์˜ ์†์„ฑ์„ ๋…๋ฆฝ์ ์œผ๋กœ ์‚ฌ์šฉ์ž ์ง€์ •ํ•ฉ๋‹ˆ๋‹ค.

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โ€‹

ํ”„๋ฆฌ์…‹ ์˜ต์…˜์ด๋‚˜ ํ”Œ๋Ÿฌ๊ทธ์ธ ์˜ต์…˜์—์„œ ํ”Œ๋Ÿฌ๊ทธ์ธ์„ ์„ค์ •ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

ํŒ

๋Œ€๋ถ€๋ถ„์˜ ๋„ํ์‚ฌ์šฐ๋ฃจ์Šค ์‚ฌ์šฉ์ž๋Š” ํ”„๋ฆฌ์…‹ ์˜ต์…˜์„ ์‚ฌ์šฉํ•ด ํ”Œ๋Ÿฌ๊ทธ์ธ์„ ์„ค์ •ํ•ฉ๋‹ˆ๋‹ค.

ํ”„๋ฆฌ์…‹์„ ์‚ฌ์šฉํ•˜๋Š” ๊ฒฝ์šฐ ํ”„๋ฆฌ์…‹ ์˜ต์…˜๋ฅผ ํ†ตํ•ด ํ”Œ๋Ÿฌ๊ทธ์ธ์„ ๊ตฌ์„ฑํ•ฉ๋‹ˆ๋‹ค.

docusaurus.config.js
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};
},
docLayoutComponent: '@theme/DocPage',
docItemComponent: '@theme/DocItem',
remarkPlugins: [require('remark-math')],
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.

์„ค์ •ํ•  ์ˆ˜ ์žˆ๋Š” ํ•„๋“œ

์˜ต์…˜๋ช…ํƒ€์ž…๊ธฐ๋ณธ๊ฐ’์„ค๋ช…
idstringํŒŒ์ผ ๊ฒฝ๋กœ(ํ™•์žฅ์ž๋Š” ์ œ์™ธํ•˜๊ณ  ๋””๋ ‰ํ„ฐ๋ฆฌ๋Š” ํฌํ•จ)๊ณ ์œ ํ•œ ๋ฌธ์„œ ID
titlestringMarkdown title or id๋ฌธ์„œ ์ œ๋ชฉ์ž…๋‹ˆ๋‹ค. ํŽ˜์ด์ง€ ๋ฉ”ํƒ€๋ฐ์ดํ„ฐ๋กœ ์‚ฌ์šฉํ•˜๋ฉฐ ์—ฌ๋Ÿฌ ์œ„์น˜(์‚ฌ์ด๋“œ๋ฐ”, ๋‹ค์Œ/์ด์ „ ๋ฒ„ํŠผ ๋“ฑ)์—์„œ ๋Œ€์ฒด๊ฐ’์œผ๋กœ ์‚ฌ์šฉ๋ฉ๋‹ˆ๋‹ค. ๋งˆํฌ๋‹ค์šด ์ œ๋ชฉ์ด ์—†๋Š” ๊ฒฝ์šฐ ๋ฌธ์„œ ์ƒ๋‹จ์— ์ž๋™์œผ๋กœ ์ถ”๊ฐ€๋ฉ๋‹ˆ๋‹ค.
pagination_labelstringsidebar_label or title๋ฌธ์„œ ๋‚ด์—์„œ ๋ฌธ์„œ์˜ ๋‹ค์Œ/์ด์ „ ๋ฒ„ํŠผ์— ํ‘œ์‹œํ•  ํ…์ŠคํŠธ๋ฅผ ์„ค์ •ํ•ฉ๋‹ˆ๋‹ค.
displayed_sidebarstringundefinedํ˜„์žฌ ๋ฌธ์„œ๋ฅผ ํƒ์ƒ‰ํ•  ๋•Œ ์ง€์ •๋œ ์‚ฌ์ด๋“œ๋ฐ”๋ฅผ ๊ฐ•์ œ๋กœ ํ‘œ์‹œํ•ฉ๋‹ˆ๋‹ค. Read the multiple sidebars guide for details.
hide_titlebooleanfalse๋ฌธ์„œ ์ƒ๋‹จ ์ œ๋ชฉ์„ ์ˆจ๊ธธ์ง€ ์—ฌ๋ถ€์ž…๋‹ˆ๋‹ค. ํ”„๋ŸฐํŠธ ๋งคํ„ฐ ์˜์—ญ์—์„œ ์„ค์ •ํ•œ ์ œ๋ชฉ๋งŒ ๊ฐ์ถฅ๋‹ˆ๋‹ค. ๋งˆํฌ๋‹ค์šด ๋ฌธ์„œ ๋‚ด์— ์ง€์ •๋œ ํƒ€์ดํ‹€์—๋Š” ์˜ํ–ฅ์„ ์ฃผ์ง€ ์•Š์Šต๋‹ˆ๋‹ค.
hide_table_of_contentsbooleanfalse๋ชฉ์ฐจ๋ฅผ ์˜ค๋ฅธ์ชฝ์œผ๋กœ ์ˆจ๊ธธ์ง€ ์—ฌ๋ถ€
toc_min_heading_levelnumber2๋ชฉ์ฐจ์— ํ‘œ์‹œ๋˜๋Š” ์ตœ์†Œ ์ œ๋ชฉ ์ˆ˜์ค€์ž…๋‹ˆ๋‹ค. 2์—์„œ 6 ์‚ฌ์ด์˜ ๊ฐ’์œผ๋กœ ์„ค์ •ํ•  ์ˆ˜ ์žˆ๊ณ  ์ตœ๋Œ“๊ฐ’๋ณด๋‹ค ์ž‘๊ฑฐ๋‚˜ ๊ฐ™์•„์•ผ ํ•ฉ๋‹ˆ๋‹ค.
toc_max_heading_levelnumber3๋ชฉ์ฐจ์— ํ‘œ์‹œ๋˜๋Š” ์ตœ๋Œ€ ์ œ๋ชฉ ์ˆ˜์ค€์ž…๋‹ˆ๋‹ค. 2์—์„œ 6 ์‚ฌ์ด์˜ ๊ฐ’์œผ๋กœ ์„ค์ •ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
pagination_nextstring | null์‚ฌ์ด๋“œ๋ฐ”์—์„œ ๋‹ค์Œ ๋ฌธ์„œํŽ˜์ด์ง€ ์ด๋™ ์˜์—ญ์—์„œ "๋‹ค์Œ" ํ•ญ๋ชฉ ๋งํฌ์— ์—ฐ๊ฒฐํ•  ๋ฌธ์„œ์˜ ID์ž…๋‹ˆ๋‹ค. Use null to disable showing "Next" for this page.
pagination_prevstring | null์‚ฌ์ด๋“œ๋ฐ”์—์„œ ์ด์ „ ๋ฌธ์„œํŽ˜์ด์ง€ ์ด๋™ ์˜์—ญ์—์„œ "์ด์ „" ํ•ญ๋ชฉ ๋งํฌ์— ์—ฐ๊ฒฐํ•  ๋ฌธ์„œ์˜ ID์ž…๋‹ˆ๋‹ค. Use null to disable showing "Previous" for this page.
parse_number_prefixesbooleannumberPrefixParser plugin option๋ฌธ์„œ์—์„œ ๋ฒˆํ˜ธ ์ ‘๋‘์‚ฌ ๊ตฌ๋ฌธ ๋ถ„์„ ๋น„ํ™œ์„ฑํ™” ์—ฌ๋ถ€์ž…๋‹ˆ๋‹ค. See also Using number prefixes.
custom_edit_urlstringComputed using the editUrl plugin option๋ฌธ์„œ๋ฅผ ํŽธ์ง‘ํ•˜๊ธฐ ์œ„ํ•œ URL
keywordsstring[]undefined๊ฒ€์ƒ‰ ์—”์ง„์—์„œ ํ•„์š”ํ•œ ๋ฌธ์„œ ํŽ˜์ด์ง€์˜ ํ‚ค์›Œ๋“œ ๋ฉ”ํƒ€ ํƒœ๊ทธ๋ฅผ ์„ค์ •ํ•ฉ๋‹ˆ๋‹ค.
descriptionstring๋งˆํฌ๋‹ค์šด ์ฝ˜ํ…์ธ  ์ฒซ ๋ฒˆ์งธ ์ค„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.
imagestringundefined๊ฒŒ์‹œ๊ธ€์— ๋Œ€ํ•œ ๋งํฌ๋ฅผ ํ‘œ์‹œํ•  ๋•Œ ๋ณด์—ฌ์ง€๋Š” ์ปค๋ฒ„ ๋˜๋Š” ์„ฌ๋„ค์ผ ์ด๋ฏธ์ง€๋ฅผ ์„ค์ •ํ•ฉ๋‹ˆ๋‹ค.
slugstringํŒŒ์ผ ๊ฒฝ๋กœAllows to customize the document URL (/<routeBasePath>/<slug>). Support multiple patterns: slug: my-doc, slug: /my/path/myDoc, slug: /.
tagsTag[]undefinedA list of strings or objects of two string fields label and permalink to tag to your docs.
draftbooleanfalse๋ฌธ์„œ๊ฐ€ ์ž‘์—… ์ค‘์ž„์„ ๋‚˜ํƒ€๋‚ด๋Š” ๋ถ€์šธ ํ”Œ๋ž˜๊ทธ์ž…๋‹ˆ๋‹ค. Draft documents will only be displayed during development.
last_updateFileChangeundefined๋งˆ์ง€๋ง‰์œผ๋กœ ์—…๋ฐ์ดํŠธ๋œ ์ž‘์„ฑ์ž, ๋‚ ์งœ๋ฅผ ์žฌ์ •์˜ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. Date can be any parsable date string.
type Tag = string | {label: string; permalink: string};
type FileChange = {date: string; author: 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
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

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