๋ฉ”์ธ ์ปจํ…์ธ ๋กœ ์ด๋™
Version: 2.0.0-beta.9

๐Ÿ“ฆ plugin-content-docs

๋ฌธ์„œ ๋งŒ๋“ค๊ธฐ ๊ธฐ๋Šฅ์„ ์ œ๊ณตํ•˜๋Š” ๋„ํ์‚ฌ์šฐ๋ฃจ์Šค์˜ ๊ธฐ๋ณธ ๋ฌธ์„œ ํ”Œ๋Ÿฌ๊ทธ์ธ์ž…๋‹ˆ๋‹ค.

์„ค์น˜

npm install --save @docusaurus/plugin-content-docs
tip

@docusaurus/preset-classic์„ ์„ค์น˜ํ•œ ๊ฒฝ์šฐ์—๋Š” ํ”Œ๋Ÿฌ๊ทธ์ธ์„ ๋”ฐ๋กœ ์„ค์น˜ํ•  ํ•„์š”๋Š” ์—†์Šต๋‹ˆ๋‹ค.

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

์„ค์ •

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

ํ•„๋“œ๋ช…ํƒ€์ž…๊ธฐ๋ณธ๊ฐ’์„ค๋ช…
pathstring'docs'์‚ฌ์ดํŠธ ๋””๋ ‰ํ„ฐ๋ฆฌ์— ๋Œ€ํ•œ ์ƒ๋Œ€ ๊ฒฝ๋กœ๋กœ ํŒŒ์ผ ์‹œ์Šคํ…œ์—์„œ ๋ฐ์ดํ„ฐ์˜ ๊ฒฝ๋กœ์ž…๋‹ˆ๋‹ค.
editUrl!!crwdBlockTags_256_sgaTkcolBdwrc!!undefined์‚ฌ์ดํŠธ๋ฅผ ํŽธ์ง‘ํ•˜๊ธฐ ์œ„ํ•œ ๊ธฐ๋ณธ URL์ž…๋‹ˆ๋‹ค. ์ตœ์ข… URL์€ editUrl + relativeDocPath ํ˜•ํƒœ๋กœ ์ฒ˜๋ฆฌ๋ฉ๋‹ˆ๋‹ค. ์˜ต์…˜ ์‚ฌ์šฉ ์‹œ ๊ฐ ํŒŒ์ผ์— ๋Œ€ํ•œ ์„ธ๋ฐ€ํ•œ ์ œ์–ด๋ฅผ ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ํ•ด๋‹น ํ•„๋“œ๋ฅผ ์„ค์ •ํ•˜์ง€ ์•Š์œผ๋ฉด ํŽธ์ง‘ ๋งํฌ๊ฐ€ ๋น„ํ™œ์„ฑํ™”๋ฉ๋‹ˆ๋‹ค.
editLocalizedFilesbooleanfalseํŽธ์ง‘ URL์ด ์›๋ณธ ํŒŒ์ผ ๋Œ€์‹  ํ˜„์ง€ํ™”๋œ ํŒŒ์ผ์„ ๋Œ€์ƒ์œผ๋กœ ์ฒ˜๋ฆฌ๋˜๋„๋ก ํ•ฉ๋‹ˆ๋‹ค. editUrl์ด ํ•จ์ˆ˜์ธ ๊ฒฝ์šฐ์—๋Š” ๋ฌด์‹œํ•ฉ๋‹ˆ๋‹ค.
editCurrentVersionbooleanfalseํŽธ์ง‘ URL์ด ํ•ญ์ƒ ์ด์ „ ๋ฒ„์ „ ๋Œ€์‹  ํ˜„์žฌ ๋ฒ„์ „ ๋ฌธ์„œ๋ฅผ ๋Œ€์ƒ์œผ๋กœ ์ฒ˜๋ฆฌ๋˜๋„๋ก ํ•ฉ๋‹ˆ๋‹ค. editUrl์ด ํ•จ์ˆ˜์ธ ๊ฒฝ์šฐ์—๋Š” ๋ฌด์‹œํ•ฉ๋‹ˆ๋‹ค.
routeBasePathstring'docs'์‚ฌ์ดํŠธ์—์„œ ์ œ๊ณตํ•˜๋Š” ๋ฌธ์„œ์— ๋Œ€ํ•œ URL ๊ฒฝ๋กœ์ž…๋‹ˆ๋‹ค. ์ ˆ๋Œ€ URL ๋์— ์Šฌ๋ž˜์‹œ๋ฅผ ๋ถ™์ด์ง€ ๋งˆ์„ธ์š”. ๊ธฐ๋ณธ ๊ฒฝ๋กœ ์—†์ด ๋ฌธ์„œ๋ฅผ ์ฒ˜๋ฆฌํ•  ๋•Œ์— /๋ฅผ ์‚ฌ์šฉํ•˜์„ธ์š”.
tagsBasePathstring'tags'์‚ฌ์ดํŠธ์—์„œ ์ œ๊ณตํ•˜๋Š” ํƒœ๊ทธ ๋ชฉ๋ก ํŽ˜์ด์ง€์— ๋Œ€ํ•œ URL ๊ฒฝ๋กœ์ž…๋‹ˆ๋‹ค. routeBasePath ์•ž์— ์ถ”๊ฐ€๋ฉ๋‹ˆ๋‹ค.
includestring[]['**/*.{md,mdx}']์ผ์น˜ํ•˜๋Š” ํŒŒ์ผ์ด ํฌํ•จ๋˜์–ด ์ฒ˜๋ฆฌ๋ฉ๋‹ˆ๋‹ค.
excludestring[]์˜ˆ์ œ ์„ค์ •์„ ์ฐธ๊ณ ํ•˜์„ธ์š”์ผ์น˜ํ•˜๋Š” ํŒŒ์ผ์— ๋Œ€ํ•œ ๊ฒฝ๋กœ๋ฅผ ์ƒ์„ฑํ•˜์ง€ ์•Š์Šต๋‹ˆ๋‹ค.
sidebarPath!!crwdBlockTags_257_sgaTkcolBdwrc!!undefined (์ž๋™์œผ๋กœ ์‚ฌ์ด๋“œ๋ฐ” ์ƒ์„ฑ)์‚ฌ์ด๋“œ๋ฐ” ๊ฒฝ๋กœ๋ฅผ ์„ค์ •ํ•ฉ๋‹ˆ๋‹ค.
sidebarCollapsiblebooleantrue์‚ฌ์ด๋“œ๋ฐ” ์นดํ…Œ๊ณ ๋ฆฌ ์ ‘๊ธฐ๋ฅผ ํ—ˆ์šฉํ•  ์ง€ ์—ฌ๋ถ€๋ฅผ ์„ค์ •ํ•ฉ๋‹ˆ๋‹ค. [์ ‘์„ ์ˆ˜ ์žˆ๋Š” ์นดํ…Œ๊ณ ๋ฆฌ] ํ•ญ๋ชฉ์„ ์ฐธ๊ณ ํ•˜์„ธ์š”(/docs/sidebar#collapsible-categories)
sidebarCollapsedbooleantrue๊ธฐ๋ณธ์ ์œผ๋กœ ์‚ฌ์ด๋“œ๋ฐ” ์นดํ…Œ๊ณ ๋ฆฌ๋ฅผ ์ ‘ํ˜€์žˆ๋Š” ์ƒํƒœ๋กœ ํ‘œ์‹œํ• ์ง€ ์—ฌ๋ถ€๋ฅผ ์„ค์ •ํ•ฉ๋‹ˆ๋‹ค. [์นดํ…Œ๊ณ ๋ฆฌ๋ฅผ ํŽผ์ณ์ง„ ์ƒํƒœ๋กœ ์„ค์ •ํ•˜๊ธฐ] ํ•ญ๋ชฉ์„ ์ฐธ๊ณ ํ•˜์„ธ์š”(/docs/sidebar#expanded-categories-by-default)
sidebarItemsGeneratorSidebarGeneratorOmitted'์ž๋™์ƒ์„ฑ' ์œ ํ˜•์˜ ์‚ฌ์ด๋“œ๋ฐ” ํ•ญ๋ชฉ์„ ์‹ค์ œ ์‚ฌ์ด๋“œ๋ฐ” ํ•ญ๋ชฉ(๋ฌธ์„œ, ์นดํ…Œ๊ณ ๋ฆฌ, ๋งํฌ...)์œผ๋กœ ๊ต์ฒดํ•  ๋•Œ ์‚ฌ์šฉํ•˜๋Š” ๊ธฐ๋Šฅ์ž…๋‹ˆ๋‹ค. [์‚ฌ์šฉ์ž ์ง€์ • ์‚ฌ์ดํŠธ๋ฐ” ์•„์ดํ…œ ์ƒ์„ฑ๊ธฐ ์‚ฌ์šฉํ•˜๊ธฐ] ํ•ญ๋ชฉ์„ ์ฐธ๊ณ ํ•˜์„ธ์š”(/docs/sidebar#customize-the-sidebar-items-generator)
numberPrefixParser!!crwdBlockTags_258_sgaTkcolBdwrc!!์ƒ๋žตํŒŒ์ผ๋ช…์—์„œ ์ˆซ์ž ์ ‘๋‘์‚ฌ๋ฅผ ์ถ”์ถœํ•˜๋Š” ์‚ฌ์šฉ์ž ์ง€์ • ๊ตฌ๋ฌธ ๋ถ„์„ ๋ฐฉ์‹์„ ์„ค์ •ํ•ฉ๋‹ˆ๋‹ค. ํ•ด๋‹น ๋™์ž‘์„ ๋น„ํ™œ์„ฑํ™”ํ•˜๊ณ  ๋ฌธ์„œ๋ฅผ ์œ ์ง€ํ•˜๋ ค๋ฉด false๋ฅผ ์„ ํƒํ•˜๊ณ  ๊ธฐ๋ณธ ๊ตฌ๋ฌธ ๋ถ„์„์„ ์‚ฌ์šฉํ•˜๋ ค๋ฉด true๋ฅผ ์„ ํƒํ•˜์„ธ์š”. [์ˆซ์ž ์ ‘๋‘์‚ฌ ์‚ฌ์šฉํ•˜๊ธฐ] ํ•ญ๋ชฉ์„ ์ฐธ๊ณ ํ•˜์„ธ์š”(/docs/sidebar#using-number-prefixes)
docLayoutComponentstring'@theme/DocPage'๊ฐ ๋ฌธ์„œ ํŽ˜์ด์ง€์˜ ๋ฃจํŠธ ๋ ˆ์ด์•„์›ƒ ์ปดํฌ๋„ŒํŠธ๋ฅผ ์„ค์ •ํ•ฉ๋‹ˆ๋‹ค.
docItemComponentstring'@theme/DocItem'๋ชฉ์ฐจ, ํŽ˜์ด์ง€ ๋ฒˆํ˜ธ๋ฅผ ๊ฐ€์ง€๋Š” ๊ธฐ๋ณธ ๋ฌธ์„œ ์ปจํ…Œ์ด๋„ˆ์ž…๋‹ˆ๋‹ค.
docTagsListComponentstring'@theme/DocTagsListPage'ํƒœํฌ ๋ชฉ๋ก ํŽ˜์ด์ง€์˜ ๋ฃจํŠธ ์ปดํฌ๋„ŒํŠธ์ž…๋‹ˆ๋‹ค.
docTagDocListComponentstring'@theme/DocTagDocListPage'"ํƒœ๊ทธ๋ฅผ ํฌํ•จํ•œ ๋ฌธ์„œ" ํŽ˜์ด์ง€์˜ ๋ฃจํŠธ ์ปดํฌ๋„ŒํŠธ์ž…๋‹ˆ๋‹ค.
remarkPluginsany[][]MDX์— ์ „๋‹ฌ๋˜๋Š” Remark ํ”Œ๋Ÿฌ๊ทธ์ธ์ž…๋‹ˆ๋‹ค.
rehypePluginsany[][]MDX์— ์ „๋‹ฌ๋˜๋Š” Rehype ํ”Œ๋Ÿฌ๊ทธ์ธ์ž…๋‹ˆ๋‹ค.
beforeDefaultRemarkPluginsany[][]๋„ํ์‚ฌ์šฐ๋ฃจ์Šค ๊ธฐ๋ณธ Remark ํ”Œ๋Ÿฌ๊ทธ์ธ๋ณด๋‹ค ๋จผ์ € MDX์— ์ „๋‹ฌ๋˜๋Š” ์ปค์Šคํ…€ Remark ํ”Œ๋Ÿฌ๊ทธ์ธ์ž…๋‹ˆ๋‹ค.
beforeDefaultRehypePluginsany[][]๋„ํ์‚ฌ์šฐ๋ฃจ์Šค ๊ธฐ๋ณธ Rehype ํ”Œ๋Ÿฌ๊ทธ์ธ๋ณด๋‹ค ๋จผ์ € MDX์— ์ „๋‹ฌ๋˜๋Š” ์ปค์Šคํ…€ Rehype ํ”Œ๋Ÿฌ๊ทธ์ธ์ž…๋‹ˆ๋‹ค.
showLastUpdateAuthorbooleanfalse๋ฌธ์„œ๋ฅผ ๋งˆ์ง€๋ง‰์œผ๋กœ ์ˆ˜์ •ํ•œ ์ž‘์„ฑ์ž๋ฅผ ํ‘œ์‹œํ• ์ง€ ์—ฌ๋ถ€๋ฅผ ์„ค์ •ํ•ฉ๋‹ˆ๋‹ค.
showLastUpdateTimebooleanfalse๋ฌธ์„œ๋ฅผ ๋งˆ์ง€๋ง‰์œผ๋กœ ์ˆ˜์ •ํ•œ ๋‚ ์งœ๋ฅผ ํ‘œ์‹œํ• ์ง€ ์—ฌ๋ถ€๋ฅผ ์„ค์ •ํ•ฉ๋‹ˆ๋‹ค.
disableVersioningbooleanfalse๋ฒ„์ „์ด ์žˆ๋Š” ๊ฒฝ์šฐ ๋ฒ„์ „ ๊ด€๋ฆฌ ๊ธฐ๋Šฅ์„ ๋ช…์‹œ์ ์œผ๋กœ ๋น„ํ™œ์„ฑํ™”ํ• ์ง€๋ฅผ ์„ค์ •ํ•ฉ๋‹ˆ๋‹ค. "ํ˜„์žฌ" ๋ฒ„์ „(/docs ๋””๋ ‰ํ„ฐ๋ฆฌ)๋งŒ ํฌํ•จ๋ฉ๋‹ˆ๋‹ค.
includeCurrentVersionbooleantrue๋ฌธ์„œ์˜ "ํ˜„์žฌ" ๋ฒ„์ „(/docs ๋””๋ ‰ํ„ฐ๋ฆฌ)๋งŒ ํฌํ•จํ•ฉ๋‹ˆ๋‹ค.
ํŒ: ํ˜„์žฌ ๋ฒ„์ „์ด ์ž‘์—… ์ƒํƒœ์ด๋ฉฐ ๊ฒŒ์‹œํ•  ์ค€๋น„๊ฐ€ ๋˜์ง€ ์•Š์•˜๋‹ค๋ฉด ์˜ต์…˜์„ ๊บผ์ฃผ์„ธ์š”.
lastVersionstringcurrent (versions.json ํŒŒ์ผ์—์„œ ์ฒซ ๋ฒˆ์งธ ๋ฒ„์ „์œผ๋กœ ์„ค์ •๋˜๊ณ  "root"(path=/docs/myDoc) ๊ฒฝ๋กœ์— ์žˆ๋Š” ๋ฒ„์ „์— ๋Œ€ํ•œ ๋ณ„์นญ)๋ฒ„์ „์ด ์ง€์ •๋œ ์‚ฌ์ดํŠธ์—์„œ ์šฐ์„ ์ ์œผ๋กœ ํƒ์ƒ‰๋˜๊ณ  ๋ฌธ์„œ ํƒ์ƒ‰๋ฐ”์—์„œ ๊ธฐ๋ณธ์ ์œผ๋กœ ํ‘œ์‹œํ•  ๋ฒ„์ „์„ ์„ค์ •ํ•ฉ๋‹ˆ๋‹ค.
์ฐธ๊ณ : ๋งˆ์ง€๋ง‰ ๋ฒ„์ „์˜ ๊ฒฝ๋กœ์™€ ๋ผ๋ฒจ์„ ์„ค์ •ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
ํŒ: lastVersion: 'current'์œผ๋กœ ์„ค์ •ํ•˜๋Š” ๊ฒƒ์€ ๋Œ€๋ถ€๋ถ„์˜ ๊ฒฝ์šฐ ์œ ์šฉํ•ฉ๋‹ˆ๋‹ค.
versionsVersions{}๊ฐ ๋ฒ„์ „์˜ ์†์„ฑ์„ ๋ณ„๋„๋กœ ์„ค์ •ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
onlyIncludeVersionsstring[]์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ๋Š” ๋ชจ๋“  ๋ฒ„์ „์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ๋Š” ๋ชจ๋“  ๋ฒ„์ „์˜ ํ•˜์œ„ ์ง‘ํ•ฉ๋งŒ ํฌํ•จํ•ฉ๋‹ˆ๋‹ค.
ํŒ: ๊ฐœ๋ฐœ์ด๋‚˜ ์ •์‹ ๋ฐฐํฌ ์ „์—๋Š” ๋น ๋ฅด๊ฒŒ ์‹œ์ž‘ํ•˜๊ณ  ๋นŒ๋“œํ•  ์ˆ˜ ์žˆ๊ฒŒ 2-3๊ฐœ ์ •๋„๋กœ ๋ฒ„์ „์„ ์ œํ•œํ•˜์„ธ์š”.
type EditUrlFunction = (params: {
version: string;
versionDocsDirPath: string;
docPath: string;
permalink: string;
locale: string;
}) => string | undefined;

type PrefixParser = (filename: string) => {
filename: string;
numberPrefix?: number;
};

type SidebarGenerator = (generatorArgs: {
item: {type: 'autogenerated'; dirName: string}; // "autogenerated" ํƒ€์ž… ์‚ฌ์ด๋“œ๋ฐ” ์•„์ดํ…œ
version: {contentPath: string; versionName: string}; // current ๋ฒ„์ „
docs: Array<{
id: string;
frontMatter: DocFrontMatter & Record<string, unknown>;
source: string;
sourceDirName: string;
sidebarPosition?: number | undefined;
}>; // all the docs of that version (unfiltered)
numberPrefixParser: PrefixParser; // ํ”Œ๋Ÿฌ๊ทธ์ธ numberPrefixParser ์„ค์ •
defaultSidebarItemsGenerator: SidebarGenerator; // ๋„ํ์‚ฌ์šฐ๋ฃจ์Šค ๊ธฐ๋ณธ ์‚ฌ์ด๋“œ๋ฐ” ์ƒ์„ฑ ๋กœ์ง์„ ์žฌ์‚ฌ์šฉํ•˜๊ฑฐ๋‚˜ ๊ธฐ๋Šฅ ๋ณด์™„ ์‹œ ์œ ์šฉํ•œ ์„ค์ •์ž…๋‹ˆ๋‹ค.
}) => Promise<SidebarItem[]>;

type Versions = Record<
string, // the version's ID
{
label: string; // ๋ฒ„์ „ ๋ผ๋ฒจ
path: string; // ๋ฒ„์ „ route ๊ฒฝ๋กœ
banner: 'none' | 'unreleased' | 'unmaintained'; // ํ•ด๋‹น ๋ฒ„์ „ ๋ฌธ์„œ ์ƒ๋‹จ์— ํ‘œ์‹œํ•  ๋ฐฐ๋„ˆ
badge: boolean; // ํ•ด๋‹น ๋ฒ„์ „ ๋ฌธ์„œ ์ƒ๋‹จ์— ์ด๋ฆ„๊ณผ ํ•จ๊ป˜ ๋ฐฐ์ง€ ํ‘œ์‹œ ์—ฌ๋ถ€
className; // ํ•ด๋‹น ๋ฒ„์ „ ๋ฌธ์„œ ํƒ์ƒ‰ ์‹œ <html> ์š”์†Œ์— ์‚ฌ์šฉ์ž ์ •์˜ className ์ถ”๊ฐ€
}
>;

์„ค์ • ์˜ˆ์‹œ

๋‹ค์Œ์€ ์˜ค๋ธŒ์ ํŠธ ์„ค์ • ์˜ˆ์‹œ์ž…๋‹ˆ๋‹ค.

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

tip

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

const config = {
path: 'docs',
// 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',
sidebarItemsGenerator: async function ({
defaultSidebarItemsGenerator,
numberPrefixParser,
item,
version,
docs,
}) {
// 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: function (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'],
};

ํ”„๋ฆฌ์…‹ ์˜ต์…˜

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

docusaurus.config.js
module.exports = {
presets: [
[
'@docusaurus/preset-classic',
{
docs: {
path: 'docs',
// ... configuration object here
},
},
],
],
};

ํ”Œ๋Ÿฌ๊ทธ์ธ ์˜ต์…˜

๋…๋ฆฝ์ ์œผ๋กœ ์‹คํ–‰๋˜๋Š” ํ”Œ๋Ÿฌ๊ทธ์ธ์„ ์‚ฌ์šฉํ•˜๋Š” ๊ฒฝ์šฐ์—๋Š” ํ”Œ๋Ÿฌ๊ทธ์ธ์— ๋Œ€ํ•œ ์˜ต์…˜์„ ์ง์ ‘ ์„ค์ •ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

docusaurus.config.js
module.exports = {
plugins: [
[
'@docusaurus/plugin-content-docs',
{
path: 'docs',
// ... configuration object here
},
],
],
};

๋งˆํฌ๋‹ค์šด ํ”„๋ŸฐํŠธ ๋งคํ„ฐ

๋งˆํฌ๋‹ค์šด ๋ฌธ์„œ์—์„œ๋Š” ---๋กœ ๊ฐ์‹ผ ๋งˆํฌ๋‹ค์šด ํ”„๋ŸฐํŠธ ๋งคํ„ฐ ์˜์—ญ์—์„œ ์•„๋ž˜์™€ ๊ฐ™์€ ๋ฉ”ํƒ€๋ฐ์ดํ„ฐ ํ•„๋“œ๋ฅผ ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

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

ํ•„๋“œ๋ช…ํƒ€์ž…๊ธฐ๋ณธ๊ฐ’์„ค๋ช…
idstringํŒŒ์ผ ๊ฒฝ๋กœ(ํ™•์žฅ์ž๋Š” ์ œ์™ธํ•˜๊ณ  ํด๋” ํฌํ•จ)์œ ์ผํ•œ ๋ฌธ์„œ id๋ฅผ ์„ค์ •ํ•ฉ๋‹ˆ๋‹ค.
titlestring๋งˆํฌ๋‹ค์šด ๋ฌธ์„œ ์ œ๋ชฉ ๋˜๋Š” id๋ฌธ์„œ ์ œ๋ชฉ์„ ์„ค์ •ํ•ฉ๋‹ˆ๋‹ค. ํŽ˜์ด์ง€ ๋ฉ”ํƒ€๋ฐ์ดํ„ฐ๋กœ ์‚ฌ์šฉํ•˜๋ฉฐ ์—ฌ๋Ÿฌ ์œ„์น˜(์‚ฌ์ด๋“œ๋ฐ”, ๋‹ค์Œ/์ด์ „ ๋ฒ„ํŠผ ๋“ฑ)์—์„œ ๋Œ€์ฒด๊ฐ’์œผ๋กœ ์‚ฌ์šฉ๋ฉ๋‹ˆ๋‹ค. ๋งˆํฌ๋‹ค์šด ์ œ๋ชฉ์ด ์—†๋Š” ๊ฒฝ์šฐ ๋ฌธ์„œ ์ƒ๋‹จ์— ์ž๋™์œผ๋กœ ์ถ”๊ฐ€๋ฉ๋‹ˆ๋‹ค.
pagination_labelstringsidebar_label ๋˜๋Š” title๋ฌธ์„œ์˜ ๋‹ค์Œ/์ด์ „ ๋ฒ„ํŠผ์— ์‚ฌ์šฉํ•  ํ…์ŠคํŠธ๋ฅผ ์„ค์ •ํ•ฉ๋‹ˆ๋‹ค.
hide_titlebooleanfalse๋ฌธ์„œ ์ƒ๋‹จ์˜ ์ œ๋ชฉ์„ ์ˆจ๊ธธ์ง€ ์—ฌ๋ถ€๋ฅผ ์„ค์ •ํ•ฉ๋‹ˆ๋‹ค. ํ”„๋ŸฐํŠธ ๋งคํ„ฐ ์˜์—ญ์—์„œ ์„ค์ •ํ•œ ์ œ๋ชฉ๋งŒ ๊ฐ์ถฅ๋‹ˆ๋‹ค. ๋งˆํฌ๋‹ค์šด ๋ฌธ์„œ ๋‚ด์— ์ง€์ •๋œ ํƒ€์ดํ‹€์—๋Š” ์˜ํ–ฅ์„ ์ฃผ์ง€ ์•Š์Šต๋‹ˆ๋‹ค.
hide_table_of_contentsbooleanfalse์˜ค๋ฅธ์ชฝ์— ํ‘œ์‹œ๋˜๋Š” ๋ชฉ์ฐจ ์ˆจ๊น€ ์—ฌ๋ถ€๋ฅผ ์„ค์ •ํ•ฉ๋‹ˆ๋‹ค.
toc_min_heading_levelnumber2๋ชฉ์ฐจ์— ํ‘œ์‹œ๋  ์ œ๋ชฉ ์ˆ˜์ค€ ์ตœ์†Ÿ๊ฐ’์„ ์„ค์ •ํ•ฉ๋‹ˆ๋‹ค. 2์—์„œ 6 ์‚ฌ์ด์˜ ๊ฐ’์œผ๋กœ ์„ค์ •ํ•  ์ˆ˜ ์žˆ๊ณ  ์ตœ๋Œ“๊ฐ’๋ณด๋‹ค ์ž‘๊ฑฐ๋‚˜ ๊ฐ™์•„์•ผ ํ•ฉ๋‹ˆ๋‹ค.
toc_max_heading_levelnumber3๋ชฉ์ฐจ์— ํ‘œ์‹œ๋  ์ œ๋ชฉ ์ˆ˜์ค€ ์ตœ๋Œ“๊ฐ’์„ ์„ค์ •ํ•ฉ๋‹ˆ๋‹ค. 2์—์„œ 6 ์‚ฌ์ด์˜ ๊ฐ’์œผ๋กœ ์„ค์ •ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
pagination_next!!crwdBlockTags_322_sgaTkcolBdwrc!!์‚ฌ์ด๋“œ๋ฐ” ํ•ญ๋ชฉ ์ค‘ ๋‹ค์Œ ๋ฌธ์„œํŽ˜์ด์ง€ ์ด๋™ ์˜์—ญ์—์„œ "๋‹ค์Œ" ํ•ญ๋ชฉ ๋งํฌ์— ์—ฐ๊ฒฐํ•  ๋ฌธ์„œ์˜ ID์ž…๋‹ˆ๋‹ค. ํ˜„์žฌ ํŽ˜์ด์ง€์—์„œ "๋‹ค์Œ" ํ•ญ๋ชฉ์— ๋ณด์—ฌ์ฃผ๊ณ  ์‹ถ์ง€ ์•Š๋‹ค๋ฉด null๋กœ ์„ค์ •ํ•˜์„ธ์š”.
pagination_prev!!crwdBlockTags_323_sgaTkcolBdwrc!!์‚ฌ์ด๋“œ๋ฐ” ํ•ญ๋ชฉ ์ค‘ ์ด์ „ ๋ฌธ์„œํŽ˜์ด์ง€ ์ด๋™ ์˜์—ญ์—์„œ "์ด์ „" ํ•ญ๋ชฉ ๋งํฌ์— ์—ฐ๊ฒฐํ•  ๋ฌธ์„œ์˜ ID์ž…๋‹ˆ๋‹ค. ํ˜„์žฌ ํŽ˜์ด์ง€์—์„œ "์ด์ „" ํ•ญ๋ชฉ์— ๋ณด์—ฌ์ฃผ๊ณ  ์‹ถ์ง€ ์•Š๋‹ค๋ฉด null๋กœ ์„ค์ •ํ•˜์„ธ์š”.
parse_number_prefixesbooleannumberPrefixParser ํ”Œ๋Ÿฌ๊ทธ์ธ ์˜ต์…˜์ˆซ์ž ์ ‘๋‘์‚ฌ ๊ตฌ๋ฌธ ๋ถ„์„ ํ™œ์„ฑํ™” ์—ฌ๋ถ€๋ฅผ ์„ค์ •ํ•ฉ๋‹ˆ๋‹ค. [์ˆซ์ž ์ ‘๋‘์‚ฌ ์‚ฌ์šฉํ•˜๊ธฐ] ํ•ญ๋ชฉ์„ ์ฐธ๊ณ ํ•˜์„ธ์š”(/docs/sidebar#using-number-prefixes).
custom_edit_urlstringeditUrl ํ”Œ๋Ÿฌ๊ทธ์ธ ์˜ต์…˜์—์„œ ์ฒ˜๋ฆฌ๋ฌธ์„œ ํŽธ์ง‘ ์‹œ ์‚ฌ์šฉํ•  URL์„ ์„ค์ •ํ•ฉ๋‹ˆ๋‹ค.
keywordsstring[]undefined๊ฒ€์ƒ‰ ์—”์ง„์—์„œ ์‚ฌ์šฉํ•  ๋ฌธ์„œ ํŽ˜์ด์ง€์˜ ํ‚ค์›Œ๋“œ ๋ฉ”ํƒ€ ํƒœ๊ทธ๋ฅผ ์„ค์ •ํ•ฉ๋‹ˆ๋‹ค.
descriptionstringThe first line of Markdown contentThe description of your document, which will become the <meta name="description" content="..."/> and <meta property="og:description" content="..."/> ํƒœ๊ทธ๊ฐ€ ์•ˆ์— ์ƒ์„ฑ๋ฉ๋‹ˆ๋‹ค.<head>, ๊ฒ€์ƒ‰ ์—”์ง„์—์„œ ์‚ฌ์šฉํ•ฉ๋‹ˆ๋‹ค.
imagestringundefined๊ฒŒ์‹œ๊ธ€์— ๋Œ€ํ•œ ๋งํฌ๋ฅผ ํ‘œ์‹œํ•  ๋•Œ ๋ณด์—ฌ์ง€๋Š” ์ปค๋ฒ„ ๋˜๋Š” ์„ฌ๋„ค์ผ ์ด๋ฏธ์ง€๋ฅผ ์„ค์ •ํ•ฉ๋‹ˆ๋‹ค.
slugstringFile pathAllows to customize the document url (/<routeBasePath>/<slug>). ์—ฌ๋Ÿฌ ํŒจํ„ด์„ ์„ค์ •ํ•  ์ˆ˜๋„ ์žˆ์Šต๋‹ˆ๋‹ค: slug: my-doc, slug: /my/path/myDoc, slug: /.
tagsTag[]undefined๋ฌธ์„œ๋ฅผ ํƒœ๊ทธํ•˜๊ธฐ ์œ„ํ•œ ๋ฌธ์ž์—ด ๋˜๋Š” label๊ณผ permalink 2๊ฐœ์˜ ํ•„๋“œ๋กœ ๊ตฌ์„ฑ๋œ ์˜ค๋ธŒ์ ํŠธ์˜ ๋ชฉ๋ก์ž…๋‹ˆ๋‹ค.
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
image: https://i.imgur.com/mErPwqL.png
slug: /myDoc
---
# Markdown Features

My Document Markdown content

i18n

i18n ์†Œ๊ฐœ ๋ฌธ์„œ๋ฅผ ๋จผ์ € ํ™•์ธํ•ด์ฃผ์„ธ์š”.

๋ฒˆ์—ญ ํŒŒ์ผ ์œ„์น˜

  • Base path: website/i18n/<locale>/docusaurus-plugin-content-docs
  • Multi-instance path: website/i18n/<locale>/docusaurus-plugin-content-docs-<pluginId>
  • JSON ํŒŒ์ผ: docusaurus write-translations ๋ช…๋ น ์‹คํ–‰ ํ›„ ๋งŒ๋“ค์–ด์ง„ ํŒŒ์ผ
  • Markdown files: website/i18n/<locale>/docusaurus-plugin-content-docs/<version>

ํŒŒ์ผ ์‹œ์Šคํ…œ ๊ตฌ์กฐ ์˜ˆ

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