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

๐Ÿ“ฆ plugin-content-blog

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

์„ค์น˜

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

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

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

์„ค์ •

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

ํ•„๋“œ๋ช…ํƒ€์ž…๊ธฐ๋ณธ๊ฐ’์„ค๋ช…
pathstring'blog'์‚ฌ์ด๋“œ ๋””๋ ‰ํ„ฐ๋ฆฌ์— ๋Œ€ํ•œ ์ƒ๋Œ€ ๊ฒฝ๋กœ๋กœ ํŒŒ์ผ ์‹œ์Šคํ…œ์—์„œ ๋ธ”๋กœ๊ทธ ์ฝ˜ํ…์ธ  ๋””๋ ‰ํ„ฐ๋ฆฌ์˜ ๊ฒฝ๋กœ์ž…๋‹ˆ๋‹ค.
editUrl!!crwdBlockTags_267_sgaTkcolBdwrc!!undefined์‚ฌ์ดํŠธ๋ฅผ ํŽธ์ง‘ํ•˜๊ธฐ ์œ„ํ•œ ๊ธฐ๋ณธ URL์ž…๋‹ˆ๋‹ค. ์ตœ์ข… URL์€ editUrl + relativeDocPath ํ˜•ํƒœ๋กœ ์ฒ˜๋ฆฌ๋ฉ๋‹ˆ๋‹ค. ์˜ต์…˜ ์‚ฌ์šฉ ์‹œ ๊ฐ ํŒŒ์ผ์— ๋Œ€ํ•œ ์„ธ๋ฐ€ํ•œ ์ œ์–ด๋ฅผ ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ํ•ด๋‹น ํ•„๋“œ๋ฅผ ์„ค์ •ํ•˜์ง€ ์•Š์œผ๋ฉด ํŽธ์ง‘ ๋งํฌ๊ฐ€ ๋น„ํ™œ์„ฑํ™”๋ฉ๋‹ˆ๋‹ค.
editLocalizedFilesbooleanfalseํŽธ์ง‘ URL์ด ์›๋ณธ ํŒŒ์ผ ๋Œ€์‹  ํ˜„์ง€ํ™”๋œ ํŒŒ์ผ์„ ๋Œ€์ƒ์œผ๋กœ ์ฒ˜๋ฆฌ๋˜๋„๋ก ํ•ฉ๋‹ˆ๋‹ค. editUrl์ด ํ•จ์ˆ˜์ธ ๊ฒฝ์šฐ์—๋Š” ๋ฌด์‹œํ•ฉ๋‹ˆ๋‹ค.
blogTitlestring'Blog'๋” ๋‚˜์€ SEO๋ฅผ ์œ„ํ•ด ๋ธ”๋กœ๊ทธ ํŽ˜์ด์ง€ ์ œ๋ชฉ์„ ์„ค์ •ํ•ฉ๋‹ˆ๋‹ค.
blogDescriptionstring'Blog'๋” ๋‚˜์€ SEO๋ฅผ ์œ„ํ•ด ๋ธ”๋กœ๊ทธ ํŽ˜์ด์ง€ ๋ฉ”ํƒ€ ์„ค๋ช…์„ ์„ค์ •ํ•ฉ๋‹ˆ๋‹ค.
blogSidebarCount!!crwdBlockTags_268_sgaTkcolBdwrc!!5๋ธ”๋กœ๊ทธ ์‚ฌ์ด๋“œ๋ฐ”์— ํ‘œ์‹œํ•  ๋ธ”๋กœ๊ทธ ๊ฒŒ์‹œ๋ฌผ ์ˆ˜์ž…๋‹ˆ๋‹ค. 'ALL' ๋ชจ๋“  ๋ธ”๋กœ๊ทธ ๊ฒŒ์‹œ๋ฌผ์„ ํ‘œ์‹œํ•ฉ๋‹ˆ๋‹ค.; 0 ํ•ด๋‹น ๊ธฐ๋Šฅ์„ ๋น„ํ™œ์„ฑํ™”ํ•ฉ๋‹ˆ๋‹ค.
blogSidebarTitlestring'Recent posts'๋ธ”๋กœ๊ทธ ์‚ฌ์ด๋“œ๋ฐ”์— ํ‘œ์‹œ๋˜๋Š” ์ œ๋ชฉ์ž…๋‹ˆ๋‹ค.
routeBasePathstring'blog'์‚ฌ์ดํŠธ์—์„œ ์ œ๊ณตํ•˜๋Š” ๋ธ”๋กœ๊ทธ์— ๋Œ€ํ•œ URL ๊ฒฝ๋กœ์ž…๋‹ˆ๋‹ค. ์ ˆ๋Œ€ URL ๋์— ์Šฌ๋ž˜์‹œ๋ฅผ ๋ถ™์ด์ง€ ๋งˆ์„ธ์š”. ๋ธ”๋กœ๊ทธ๋ฅผ ๋ฃจํŠธ ๊ฒฝ๋กœ๋กœ ์„ค์ •ํ•  ๋•Œ๋งŒ /๋ฅผ ์‚ฌ์šฉํ•ฉ๋‹ˆ๋‹ค.
tagsBasePathstring'tags'์‚ฌ์ดํŠธ์—์„œ ์ œ๊ณตํ•˜๋Š” ํƒœ๊ทธ ๋ชฉ๋ก ํŽ˜์ด์ง€์— ๋Œ€ํ•œ URL ๊ฒฝ๋กœ์ž…๋‹ˆ๋‹ค. routeBasePath ์•ž์— ์ถ”๊ฐ€๋ฉ๋‹ˆ๋‹ค.
archiveBasePathstring'/archive'์‚ฌ์ดํŠธ์—์„œ ์ œ๊ณตํ•˜๋Š” ์•„์นด์ด๋ธŒ ๋ธ”๋กœ๊ทธ์— ๋Œ€ํ•œ URL ๊ฒฝ๋กœ์ž…๋‹ˆ๋‹ค. routeBasePath ์•ž์— ์ถ”๊ฐ€๋ฉ๋‹ˆ๋‹ค. ์ ˆ๋Œ€ URL ๋์— ์Šฌ๋ž˜์‹œ๋ฅผ ๋ถ™์ด์ง€ ๋งˆ์„ธ์š”.
includestring[]['**/*.{md,mdx}']์ผ์น˜ํ•˜๋Š” ํŒŒ์ผ์ด ํฌํ•จ๋˜์–ด ์ฒ˜๋ฆฌ๋ฉ๋‹ˆ๋‹ค.
excludestring[]์˜ˆ์ œ ์„ค์ •์„ ์ฐธ๊ณ ํ•˜์„ธ์š”์ผ์น˜ํ•˜๋Š” ํŒŒ์ผ์— ๋Œ€ํ•œ ๊ฒฝ๋กœ๋ฅผ ์ƒ์„ฑํ•˜์ง€ ์•Š์Šต๋‹ˆ๋‹ค.
postsPerPage!!crwdBlockTags_269_sgaTkcolBdwrc!!10๋ชฉ๋ก ํŽ˜์ด์ง€์—์„œ ํŽ˜์ด์ง€ ๋‹น ํ‘œ์‹œํ•  ๊ฒŒ์‹œ๋ฌผ ์ˆ˜์ž…๋‹ˆ๋‹ค. ํ•˜๋‚˜์˜ ๋ชฉ๋ก ํŽ˜์ด์ง€์— ๋ชจ๋“  ๊ฒŒ์‹œ๋ฌผ์„ ํ‘œ์‹œํ•˜๋ ค๋ฉด 'ALL'์„ ์„ค์ •ํ•ฉ๋‹ˆ๋‹ค.
blogListComponentstring'@theme/BlogListPage'๋ธ”๋กœ๊ทธ ๋ชฉ๋ก ํŽ˜์ด์ง€์˜ ๋ฃจํŠธ ์ปดํฌ๋„ŒํŠธ์ž…๋‹ˆ๋‹ค.
blogPostComponentstring'@theme/BlogPostPage'๊ฐ ๋ธ”๋กœ๊ทธ ๊ฒŒ์‹œ๋ฌผ ํŽ˜์ด์ง€์˜ ๋ฃจํŠธ ์ปดํฌ๋„ŒํŠธ์ž…๋‹ˆ๋‹ค.
blogTagsListComponentstring'@theme/BlogTagsListPage'ํƒœ๊ทธ ๋ชฉ๋ก ํŽ˜์ด์ง€์˜ ๋ฃจํŠธ ์ปดํฌ๋„ŒํŠธ์ž…๋‹ˆ๋‹ค.
blogTagsPostsComponentstring'@theme/BlogTagsPostsPage'"ํƒœ๊ทธ๊ฐ€ ํฌํ•จ๋œ ๊ฒŒ์‹œ๋ฌผ" ํŽ˜์ด์ง€์˜ ๋ฃจํŠธ ์ปดํฌ๋„ŒํŠธ์ž…๋‹ˆ๋‹ค.
remarkPluginsany[][]MDX์— ์ „๋‹ฌ๋˜๋Š” Remark ํ”Œ๋Ÿฌ๊ทธ์ธ์ž…๋‹ˆ๋‹ค.
rehypePluginsany[][]MDX์— ์ „๋‹ฌ๋˜๋Š” Rehype ํ”Œ๋Ÿฌ๊ทธ์ธ์ž…๋‹ˆ๋‹ค.
beforeDefaultRemarkPluginsany[][]๋„ํ์‚ฌ์šฐ๋ฃจ์Šค ๊ธฐ๋ณธ Remark ํ”Œ๋Ÿฌ๊ทธ์ธ๋ณด๋‹ค ๋จผ์ € MDX์— ์ „๋‹ฌ๋˜๋Š” ์ปค์Šคํ…€ Remark ํ”Œ๋Ÿฌ๊ทธ์ธ์ž…๋‹ˆ๋‹ค.
beforeDefaultRehypePluginsany[][]๋„ํ์‚ฌ์šฐ๋ฃจ์Šค ๊ธฐ๋ณธ Rehype ํ”Œ๋Ÿฌ๊ทธ์ธ๋ณด๋‹ค ๋จผ์ € MDX์— ์ „๋‹ฌ๋˜๋Š” ์ปค์Šคํ…€ Rehype ํ”Œ๋Ÿฌ๊ทธ์ธ์ž…๋‹ˆ๋‹ค.
truncateMarkerstring/<!--\s*(truncate)\s*-->/truncateMarker๋Š” ์ •๊ทœ์‹ ๋˜๋Š” ๋ฌธ์ž์—ด๋กœ ์„ค์ •ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
showReadingTimebooleantrue๋ธ”๋กœ๊ทธ ๊ฒŒ์‹œ๋ฌผ์˜ ์˜ˆ์ƒ ์ฝ๊ธฐ ์‹œ๊ฐ„์„ ํ‘œ์‹œํ•ฉ๋‹ˆ๋‹ค.
readingTimeReadingTimeFunctionOption์˜ˆ์ƒ ์ฝ๊ธฐ ์‹œ๊ฐ„ ๊ธฐ๋ณธ๊ฐ’์˜ˆ์ƒ ์ฝ๊ธฐ ์‹œ๊ฐ„์„ ํ‘œ์‹œ ์‹œ๊ฐ„์„ ์‚ฌ์šฉ์ž ์ง€์ •ํ•˜๊ธฐ ์œ„ํ•œ ์ฝœ๋ฐฑ์ž…๋‹ˆ๋‹ค.
authorsMapPathstring'authors.yml'path์—์„œ ์„ค์ •ํ•œ ๋ธ”๋กœ๊ทธ ์ฝ˜ํ…์ธ  ๋””๋ ‰ํ„ฐ๋ฆฌ์— ์ƒ๋Œ€ ๊ฒฝ๋กœ๋กœ ์„ค์ •ํ•œ ์ €์ž ๋งต ํŒŒ์ผ ๊ฒฝ๋กœ์ž…๋‹ˆ๋‹ค. json ํŒŒ์ผ๋กœ ์„ค์ •ํ•  ์ˆ˜๋„ ์žˆ์Šต๋‹ˆ๋‹ค.
feedOptions์˜ˆ์ œ ์„ค์ •์„ ์ฐธ์กฐํ•˜์„ธ์š”{type: ['rss', 'atom']}๋ธ”๋กœ๊ทธ ํ”ผ๋“œ์ž…๋‹ˆ๋‹ค. ํ•ด๋‹น ํ•„๋“œ๋ฅผ ์„ค์ •ํ•˜์ง€ ์•Š์œผ๋ฉด RSS ํ”ผ๋“œ๊ฐ€ ๋งŒ๋“ค์–ด์ง€์ง€ ์•Š์Šต๋‹ˆ๋‹ค.
feedOptions.type!!crwdBlockTags_270_sgaTkcolBdwrc!! (๋˜๋Š” ์—ฌ๋Ÿฌ ์˜ต์…˜์˜ ๋ฐฐ์—ด)ํ•„์ˆ˜์ƒ์„ฑํ•  ํ”ผ๋“œ ์œ ํ˜•์ž…๋‹ˆ๋‹ค.
feedOptions.titlestringsiteConfig.titleํ”ผ๋“œ ์ œ๋ชฉ์ž…๋‹ˆ๋‹ค.
feedOptions.descriptionstring!!crwdBlockTags_271_sgaTkcolBdwrc!!ํ”ผ๋“œ ์„ค๋ช…์ž…๋‹ˆ๋‹ค.
feedOptions.copyrightstringundefined์ €์ž‘๊ถŒ ๊ด€๋ จ ๋ฌธ๊ตฌ์ž…๋‹ˆ๋‹ค.
feedOptions.languagestring (์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ๋Š” ๊ฐ’์€ documentation๋ฅผ ์ฐธ๊ณ ํ•˜์„ธ์š”)undefinedํ”ผ๋“œ์˜ ์–ธ์–ด ๋ฉ”ํƒ€๋ฐ์ดํ„ฐ์ž…๋‹ˆ๋‹ค.
type EditUrlFunction = (params: {
blogDirPath: string;
blogPath: string;
permalink: string;
locale: string;
}) => string | undefined;

type ReadingTimeOptions = {
wordsPerMinute: number;
wordBound: (char: string) => boolean;
};

type ReadingTimeFunction = (params: {
content: string;
frontMatter?: BlogPostFrontMatter & Record<string, unknown>;
options?: ReadingTimeOptions;
}) => number;

type ReadingTimeFunctionOption = (params: {
content: string;
frontMatter: BlogPostFrontMatter & Record<string, unknown>;
defaultReadingTime: ReadingTimeFunction;
}) => number | undefined;

์„ค์ • ์˜ˆ์‹œ

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

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

tip

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

const config = {
path: 'blog',
// Simple use-case: string editUrl
// editUrl: 'https://github.com/facebook/docusaurus/edit/main/website/',
// Advanced use-case: functional editUrl
editUrl: ({locale, blogDirPath, blogPath, permalink}) => {
return `https://github.com/facebook/docusaurus/edit/main/website/${blogDirPath}/${blogPath}`;
},
editLocalizedFiles: false,
blogTitle: 'Blog title',
blogDescription: 'Blog',
blogSidebarCount: 5,
blogSidebarTitle: 'All our posts',
routeBasePath: 'blog',
include: ['**/*.{md,mdx}'],
exclude: [
'**/_*.{js,jsx,ts,tsx,md,mdx}',
'**/_*/**',
'**/*.test.{js,jsx,ts,tsx}',
'**/__tests__/**',
],
postsPerPage: 10,
blogListComponent: '@theme/BlogListPage',
blogPostComponent: '@theme/BlogPostPage',
blogTagsListComponent: '@theme/BlogTagsListPage',
blogTagsPostsComponent: '@theme/BlogTagsPostsPage',
remarkPlugins: [require('remark-math')],
rehypePlugins: [],
beforeDefaultRemarkPlugins: [],
beforeDefaultRehypePlugins: [],
truncateMarker: /<!--\s*(truncate)\s*-->/,
showReadingTime: true,
feedOptions: {
type: '',
title: '',
description: '',
copyright: '',
language: undefined,
},
};

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

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

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

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

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

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

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

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

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

ํ•„๋“œ๋ช…ํƒ€์ž…๊ธฐ๋ณธ๊ฐ’์„ค๋ช…
authorsAuthorsundefined๋ธ”๋กœ๊ทธ ๊ฒŒ์‹œ๋ฌผ ์ž‘์„ฑ์ž ๋ชฉ๋ก์ž…๋‹ˆ๋‹ค(๋˜๋Š” ์ž‘์„ฑ์ž). ์ž์„ธํ•œ ์„ค๋ช…์€ ์ž‘์„ฑ์ž ๊ฐ€์ด๋“œ๋ฅผ ์ฐธ๊ณ ํ•˜์„ธ์š”. ๋ธ”๋กœ๊ทธ ๊ฒŒ์‹œ๋ฌผ ์ž‘์„ฑ์ž๊ฐ€ ํ•œ ๋ช…์ธ ๊ฒฝ์šฐ์—๋„ author_*๋ณด๋‹ค๋Š” authors๋ฅผ ํ”„๋ŸฐํŠธ ๋งคํ„ฐ ํ•„๋“œ๋กœ ๊ถŒ์žฅํ•ฉ๋‹ˆ๋‹ค.
authorstringundefinedโš ๏ธ authors๋ฅผ ์‚ฌ์šฉํ•  ๊ฒƒ์„ ๊ถŒ์žฅํ•ฉ๋‹ˆ๋‹ค. ๋ธ”๋กœ๊ทธ ๊ฒŒ์‹œ๋ฌผ ์ž‘์„ฑ์ž ์ด๋ฆ„์ž…๋‹ˆ๋‹ค.
author_urlstringundefinedโš ๏ธ authors๋ฅผ ์‚ฌ์šฉํ•  ๊ฒƒ์„ ๊ถŒ์žฅํ•ฉ๋‹ˆ๋‹ค. ์ž‘์„ฑ์ž ์ด๋ฆ„์— ๋งํฌ๋กœ ์—ฐ๊ฒฐ๋  URL์„ ์„ค์ •ํ•ฉ๋‹ˆ๋‹ค. ๊นƒํ—™, ํŠธ์œ„ํ„ฐ, ํŽ˜์ด์Šค๋ถ ํ”„๋กœํ•„ URL ๋“ฑ์„ ์„ค์ •ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
author_image_urlstringundefinedโš ๏ธ authors๋ฅผ ์‚ฌ์šฉํ•  ๊ฒƒ์„ ๊ถŒ์žฅํ•ฉ๋‹ˆ๋‹ค. ์ž‘์„ฑ์ž ์ธ๋„ค์ผ ์ด๋ฏธ์ง€ URL์„ ์„ค์ •ํ•ฉ๋‹ˆ๋‹ค.
author_titlestringundefinedโš ๏ธ authors๋ฅผ ์‚ฌ์šฉํ•  ๊ฒƒ์„ ๊ถŒ์žฅํ•ฉ๋‹ˆ๋‹ค. ์ž‘์„ฑ์ž์— ๋Œ€ํ•œ ์„ค๋ช…์ž…๋‹ˆ๋‹ค.
titlestring๋งˆํฌ๋‹ค์šด title๋ธ”๋กœ๊ทธ ๊ฒŒ์‹œ๋ฌผ ์ œ๋ชฉ์ž…๋‹ˆ๋‹ค.
datestringํŒŒ์ผ๋ช… ๋˜๋Š” ํŒŒ์ผ ์ƒ์„ฑ ์‹œ๊ฐ„๋ธ”๋กœ๊ทธ ๊ฒŒ์‹œ๋ฌผ ์ž‘์„ฑ์ผ์ž…๋‹ˆ๋‹ค. ํ•ด๋‹น ํ•„๋“œ๋ฅผ ์„ค์ •ํ•˜์ง€ ์•Š์œผ๋ฉด ํŒŒ์ผ ๋˜๋Š” ํด๋”๋ช…์—์„œ ์ถ”์ถœํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ์˜ˆ๋ฅผ ๋“ค๋ฉด ๋‹ค์Œ๊ณผ ๊ฐ™์€ ํ˜•์‹์ž…๋‹ˆ๋‹ค. 2021-04-15-blog-post.mdx, 2021-04-15-blog-post/index.mdx, 2021/04/15/blog-post.mdx. ๊ทธ๋ ‡์ง€ ์•Š์œผ๋ฉด ๋งˆํฌ๋‹ค์šด ํŒŒ์ผ์„ ์ƒ์„ฑํ•œ ์‹œ๊ฐ„์œผ๋กœ ์„ค์ •๋ฉ๋‹ˆ๋‹ค.
tagsTag[]undefined๊ฒŒ์‹œ๋ฌผ์„ ํƒœ๊ทธํ•˜๊ธฐ ์œ„ํ•œ ๋ฌธ์ž์—ด ๋˜๋Š” label๊ณผ permalink 2๊ฐœ์˜ ํ•„๋“œ๋กœ ๊ตฌ์„ฑ๋œ ์˜ค๋ธŒ์ ํŠธ์˜ ๋ชฉ๋ก์ž…๋‹ˆ๋‹ค.
draftbooleanfalse์•„์ง ๊ฒŒ์‹œ๊ธ€์„ ์ž‘์„ฑํ•˜๊ณ  ์žˆ๋‹ค๋ฉด ๊ณต๊ฐœ ์—ฌ๋ถ€๋ฅผ ์„ค์ •ํ•ด ์™ธ๋ถ€์— ๋ณด์ด์ง€ ์•Š๋„๋ก ์„ค์ •ํ•ฉ๋‹ˆ๋‹ค. ๋น„๊ณต๊ฐœ ์„ค์ • ๊ฒŒ์‹œ๋ฌผ๋„ ๊ฐœ๋ฐœ ์„œ๋ฒ„์—์„œ๋Š” ํ™•์ธํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
hide_table_of_contentsbooleanfalse์˜ค๋ฅธ์ชฝ์— ํ‘œ์‹œ๋˜๋Š” ๋ชฉ์ฐจ ์ˆจ๊น€ ์—ฌ๋ถ€๋ฅผ ์„ค์ •ํ•ฉ๋‹ˆ๋‹ค.
toc_min_heading_levelnumber2๋ชฉ์ฐจ์— ํ‘œ์‹œ๋  ์ œ๋ชฉ ์ˆ˜์ค€ ์ตœ์†Ÿ๊ฐ’์„ ์„ค์ •ํ•ฉ๋‹ˆ๋‹ค. 2์—์„œ 6 ์‚ฌ์ด์˜ ๊ฐ’์œผ๋กœ ์„ค์ •ํ•  ์ˆ˜ ์žˆ๊ณ  ์ตœ๋Œ“๊ฐ’๋ณด๋‹ค ์ž‘๊ฑฐ๋‚˜ ๊ฐ™์•„์•ผ ํ•ฉ๋‹ˆ๋‹ค.
toc_max_heading_levelnumber3๋ชฉ์ฐจ์— ํ‘œ์‹œ๋  ์ œ๋ชฉ ์ˆ˜์ค€ ์ตœ๋Œ“๊ฐ’์„ ์„ค์ •ํ•ฉ๋‹ˆ๋‹ค. 2์—์„œ 6 ์‚ฌ์ด์˜ ๊ฐ’์œผ๋กœ ์„ค์ •ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
keywordsstring[]undefinedํ‚ค์›Œ๋“œ ๋ฉ”ํƒ€ ํƒœ๊ทธ์ž…๋‹ˆ๋‹ค. <meta name="keywords" content="keyword1,keyword2,..."/> ํƒœ๊ทธ๊ฐ€ ์•ˆ์— ์ƒ์„ฑ๋ฉ๋‹ˆ๋‹ค.<head>, ๊ฒ€์ƒ‰ ์—”์ง„์—์„œ ์‚ฌ์šฉํ•ฉ๋‹ˆ๋‹ค.
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 blog post url (/<routeBasePath>/<slug>). ์—ฌ๋Ÿฌ ํŒจํ„ด์„ ์„ค์ •ํ•  ์ˆ˜๋„ ์žˆ์Šต๋‹ˆ๋‹ค: slug: my-blog-post, slug: /my/path/to/blog/post, slug: /.
type Tag = string | {label: string; permalink: string};

// An author key references an author from the global plugin authors.yml file
type AuthorKey = string;

type Author = {
key?: AuthorKey;
name: string;
title?: string;
url?: string;
image_url?: string;
};

// The FrontMatter authors field allows various possible shapes
type Authors = AuthorKey | Author | (AuthorKey | Author)[];

์˜ˆ๋ฅผ ๋“ค๋ฉด ์•„๋ž˜์™€ ๊ฐ™์ด ์„ค์ •ํ•ฉ๋‹ˆ๋‹ค.

---
title: Welcome Docusaurus v2
authors:
- slorber
- yangshun
- name: Joel Marcey
title: Co-creator of Docusaurus 1
url: https://github.com/JoelMarcey
image_url: https://github.com/JoelMarcey.png
tags: [hello, docusaurus-v2]
description: This is my first post on Docusaurus 2.
image: https://i.imgur.com/mErPwqL.png
hide_table_of_contents: false
---
A Markdown blog post

i18n

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

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

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

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

website/i18n/<locale>/docusaurus-plugin-content-blog
โ”‚
โ”‚ # translations for website/blog
โ”œโ”€โ”€ authors.yml
โ”œโ”€โ”€ first-blog-post.md
โ”œโ”€โ”€ second-blog-post.md
โ”‚
โ”‚ # translations for the plugin options that will be rendered
โ””โ”€โ”€ options.json