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

๐Ÿ“ฆ plugin-content-blog

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

์ผ๋ถ€ ๊ธฐ๋Šฅ์€ ์ œํ’ˆ ์ „์šฉ์ž…๋‹ˆ๋‹ค

ํ”ผ๋“œ ๊ธฐ๋Šฅ์€ ๋นŒ๋“œ ์‚ฐ์ถœ๋ฌผ์—์„œ๋งŒ ์ž‘๋™ํ•˜๋ฉฐ ์ œํ’ˆ ๋ฒ„์ „์—์„œ๋งŒ ํ™œ์„ฑํ™”๋ฉ๋‹ˆ๋‹ค.

์„ค์น˜โ€‹

npm install --save @docusaurus/plugin-content-blog
ํŒ

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

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

์„ค์ •โ€‹

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

์˜ต์…˜๋ช…ํƒ€์ž…๊ธฐ๋ณธ๊ฐ’์„ค๋ช…
pathstring'blog'์‚ฌ์ดํŠธ ๋””๋ ‰ํ† ๋ฆฌ์— ์ƒ๋Œ€์ ์ธ ํŒŒ์ผ ์‹œ์Šคํ…œ์˜ ๋ธ”๋กœ๊ทธ ์ฝ˜ํ…์ธ  ๋””๋ ‰ํ† ๋ฆฌ ๊ฒฝ๋กœ์ž…๋‹ˆ๋‹ค.
editUrlstring | EditUrlFnundefined์‚ฌ์ดํŠธ๋ฅผ ํŽธ์ง‘ํ•˜๊ธฐ ์œ„ํ•œ Base URL์ž…๋‹ˆ๋‹ค. ์ตœ์ข… URL์€ editUrl + relativePostPath ํ˜•ํƒœ๋กœ ์ฒ˜๋ฆฌ๋ฉ๋‹ˆ๋‹ค. ์˜ต์…˜ ์‚ฌ์šฉ ์‹œ ๊ฐ ํŒŒ์ผ์— ๋Œ€ํ•œ ์„ธ๋ฐ€ํ•œ ์ œ์–ด๋ฅผ ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ํ•ด๋‹น ํ•„๋“œ๋ฅผ ์„ค์ •ํ•˜์ง€ ์•Š์œผ๋ฉด ํŽธ์ง‘ ๋งํฌ๊ฐ€ ๋น„ํ™œ์„ฑํ™”๋ฉ๋‹ˆ๋‹ค.
editLocalizedFilesbooleanfalseํŽธ์ง‘ URL์€ ํ˜„์ง€ํ™”๋˜์ง€ ์•Š์€ ์›๋ณธ ํŒŒ์ผ ๋Œ€์‹  ํ˜„์ง€ํ™”๋œ ํŒŒ์ผ์„ ๋Œ€์ƒ์œผ๋กœ ํ•ฉ๋‹ˆ๋‹ค. editUrl์ด ํ•จ์ˆ˜์ธ ๊ฒฝ์šฐ์—๋Š” ๋ฌด์‹œํ•ฉ๋‹ˆ๋‹ค.
blogTitlestring'Blog'๋” ๋‚˜์€ SEO๋ฅผ ์œ„ํ•œ ๋ธ”๋กœ๊ทธ ํŽ˜์ด์ง€ ์ œ๋ชฉ
blogDescriptionstring'Blog'๋” ๋‚˜์€ SEO๋ฅผ ์œ„ํ•œ ๋ธ”๋กœ๊ทธ ํŽ˜์ด์ง€ ๋ฉ”ํƒ€ ์„ค๋ช…
blogSidebarCountnumber | 'ALL'5๋ธ”๋กœ๊ทธ ์‚ฌ์ด๋“œ๋ฐ”์— ํ‘œ์‹œํ•  ๋ธ”๋กœ๊ทธ ๊ฒŒ์‹œ๋ฌผ ์ˆ˜์ž…๋‹ˆ๋‹ค. ๋ชจ๋“  ๋ธ”๋กœ๊ทธ ๊ฒŒ์‹œ๋ฌผ์„ ํ‘œ์‹œํ•˜๋ ค๋ฉด 'ALL', ๊ฐ์ถ”๋ ค๋ฉด 0
blogSidebarTitlestring'Recent posts'๋ธ”๋กœ๊ทธ ์‚ฌ์ด๋“œ๋ฐ” ์ œ๋ชฉ
routeBasePathstring'blog'์‚ฌ์ดํŠธ ๋ธ”๋กœ๊ทธ ์„น์…˜์— ๋Œ€ํ•œ URL ๋ผ์šฐํŠธ ํŠธ๋ ˆ์ผ๋ง ์Šฌ๋ž˜์‹œ๋ฅผ ํฌํ•จํ•˜์ง€ ๋งˆ์„ธ์š”. ๋ธ”๋กœ๊ทธ๋ฅผ ๋ฃจํŠธ ๊ฒฝ๋กœ๋กœ ์„ค์ •ํ•  ๋•Œ๋งŒ /๋ฅผ ์‚ฌ์šฉํ•ฉ๋‹ˆ๋‹ค.
tagsBasePathstring'tags'๋ธ”๋กœ๊ทธ ํƒœ๊ทธ ์„น์…˜์— ๋Œ€ํ•œ URL ๋ผ์šฐํŠธ routeBasePath์— ์ถ”๊ฐ€๋ฉ๋‹ˆ๋‹ค. ํŠธ๋ ˆ์ผ๋ง ์Šฌ๋ž˜์‹œ๋ฅผ ํฌํ•จํ•˜์ง€ ๋งˆ์„ธ์š”.
archiveBasePathstring | null'archive'๋ธ”๋กœ๊ทธ ์•„์นด์ด๋ธŒ ์„น์…˜์— ๋Œ€ํ•œ URL ๋ผ์šฐํŠธ routeBasePath์— ์ถ”๊ฐ€๋ฉ๋‹ˆ๋‹ค. ํŠธ๋ ˆ์ผ๋ง ์Šฌ๋ž˜์‹œ๋ฅผ ํฌํ•จํ•˜์ง€ ๋งˆ์„ธ์š”. ์•„์นด์ด๋ธŒ ์ƒ์„ฑ์„ ํ•˜์ง€ ์•Š์œผ๋ ค๋ฉด null๋กœ ์„ค์ •ํ•ฉ๋‹ˆ๋‹ค.
includestring[]['**/*.{md,mdx}']์ฝ˜ํ…์ธ  ๊ฒฝ๋กœ๋ฅผ ๊ธฐ์ค€์œผ๋กœ ๋นŒ๋“œํ•  ๋งˆํฌ๋‹ค์šด ํŒŒ์ผ๊ณผ ์ผ์น˜ํ•˜๋Š” glob ํŒจํ„ด ๋ฐฐ์—ด์ž…๋‹ˆ๋‹ค.
excludestring[]์„ค์ • ์˜ˆ์‹œ๋ฅผ ์ฐธ์กฐํ•˜์„ธ์š”์ œ์™ธํ•  ๋งˆํฌ๋‹ค์šด ํŒŒ์ผ๊ณผ ์ผ์น˜ํ•˜๋Š” glob ํŒจํ„ด ๋ฐฐ์—ด์ž…๋‹ˆ๋‹ค. include ์˜ต์…˜์„ ์ข€ ๋” ์„ธ๋ถ„ํ™”ํ•˜๋Š” ์—ญํ• ์„ ํ•ฉ๋‹ˆ๋‹ค.
postsPerPagenumber | 'ALL'10๋ชฉ๋ก ํŽ˜์ด์ง€์—์„œ ํŽ˜์ด์ง€ ๋‹น ํ‘œ์‹œํ•  ๊ฒŒ์‹œ๋ฌผ ์ˆ˜์ž…๋‹ˆ๋‹ค. ํ•˜๋‚˜์˜ ๋ชฉ๋ก ํŽ˜์ด์ง€์— ๋ชจ๋“  ๊ฒŒ์‹œ๋ฌผ์„ ํ‘œ์‹œํ•˜๋ ค๋ฉด 'ALL'์„ ์„ค์ •ํ•ฉ๋‹ˆ๋‹ค.
blogListComponentstring'@theme/BlogListPage'๋ธ”๋กœ๊ทธ ๋ชฉ๋ก ํŽ˜์ด์ง€์˜ ๋ฃจํŠธ ์ปดํฌ๋„ŒํŠธ
blogPostComponentstring'@theme/BlogPostPage'๊ฐ ๋ธ”๋กœ๊ทธ ๊ฒŒ์‹œ๋ฌผ ํŽ˜์ด์ง€์˜ ๋ฃจํŠธ ์ปดํฌ๋„ŒํŠธ
blogTagsListComponentstring'@theme/BlogTagsListPage'ํƒœ๊ทธ ๋ชฉ๋ก ํŽ˜์ด์ง€์˜ ๋ฃจํŠธ ์ปดํฌ๋„ŒํŠธ
blogTagsPostsComponentstring'@theme/BlogTagsPostsPage'"ํƒœ๊ทธ๋ฅผ ํฌํ•จํ•œ ๊ฒŒ์‹œ๋ฌผ" ํŽ˜์ด์ง€์˜ ๋ฃจํŠธ ์ปดํฌ๋„ŒํŠธ
blogArchiveComponentstring'@theme/BlogArchivePage'๋ธ”๋กœ๊ทธ ์•„์นด์ด๋ธŒ ํŽ˜์ด์ง€์˜ ๋ฃจํŠธ ์ปดํฌ๋„ŒํŠธ
remarkPluginsany[][]MDX์— ์ „๋‹ฌ๋œ Remark ํ”Œ๋Ÿฌ๊ทธ์ธ
rehypePluginsany[][]MDX์— ์ „๋‹ฌ๋œ Rehype ํ”Œ๋Ÿฌ๊ทธ์ธ
beforeDefaultRemarkPluginsany[][]๊ธฐ๋ณธ ๋„ํ์‚ฌ์šฐ๋ฃจ์Šค Remark ํ”Œ๋Ÿฌ๊ทธ์ธ๋ณด๋‹ค ๋จผ์ € MDX์— ์ „๋‹ฌ๋œ ์‚ฌ์šฉ์ž ์ง€์ • Remark ํ”Œ๋Ÿฌ๊ทธ์ธ
beforeDefaultRehypePluginsany[][]๊ธฐ๋ณธ ๋„ํ์‚ฌ์šฐ๋ฃจ์Šค Rehype ํ”Œ๋Ÿฌ๊ทธ์ธ๋ณด๋‹ค ๋จผ์ € MDX์— ์ „๋‹ฌ๋œ ์‚ฌ์šฉ์ž ์ง€์ • Rehype ํ”Œ๋Ÿฌ๊ทธ์ธ
truncateMarkerRegExp/<!--\s*(truncate)\s*-->/์š”์•ฝ์ด ๋๋‚˜๋Š” ๊ณณ์„ ํ‘œ์‹œํ•˜๋Š” Truncate marker
showReadingTimebooleantrue๋ธ”๋กœ๊ทธ ๊ฒŒ์‹œ๋ฌผ์˜ ์˜ˆ์ƒ ์ฝ๊ธฐ ์‹œ๊ฐ„์„ ํ‘œ์‹œ
readingTimeReadingTimeFn๊ธฐ๋ณธ ์ฝ๊ธฐ ์‹œ๊ฐ„ํ‘œ์‹œ๋˜๋Š” ์ฝ๊ธฐ ์‹œ๊ฐ„ ์ˆซ์ž๋ฅผ ์‚ฌ์šฉ์ž ์ง€์ •ํ•˜๊ธฐ ์œ„ํ•œ ์ฝœ๋ฐฑ
authorsMapPathstring'authors.yml'๋ธ”๋กœ๊ทธ ์ฝ˜ํ…์ธ  ๋””๋ ‰ํ† ๋ฆฌ์— ์ƒ๋Œ€์ ์ธ ์ž‘์„ฑ์ž ๋งต ํŒŒ์ผ ๊ฒฝ๋กœ
feedOptions์•„๋ž˜๋ฅผ ์ฐธ์กฐํ•˜์„ธ์š”.{type: ['rss', 'atom']}๋ธ”๋กœ๊ทธ ํ”ผ๋“œ
feedOptions.typeFeedType | FeedType[] | 'all' | nullํ•„์ˆ˜์ƒ์„ฑํ•  ํ”ผ๋“œ ์œ ํ˜•์ž…๋‹ˆ๋‹ค. ์ƒ์„ฑ์„ ํ•˜์ง€ ์•Š์œผ๋ ค๋ฉด null๋กœ ์„ค์ •ํ•ฉ๋‹ˆ๋‹ค.
feedOptions.titlestringsiteConfig.titleํ”ผ๋“œ ์ œ๋ชฉ
feedOptions.descriptionstring`${siteConfig.title} Blog`ํ”ผ๋“œ ์„ค๋ช…
feedOptions.copyrightstringundefined์ €์ž‘๊ถŒ ๋ฌธ๊ตฌ
feedOptions.languagestring (์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ๋Š” ๊ฐ’์€ ๋ฌธ์„œ๋ฅผ ์ฐธ๊ณ )undefinedํ”ผ๋“œ ์–ธ์–ด ๋ฉ”ํƒ€๋ฐ์ดํ„ฐ
sortPosts'descending' | 'ascending' 'descending'๋ธ”๋กœ๊ทธ ๊ฒŒ์‹œ๋ฌผ ์ •๋ ฌ ์ˆœ์„œ ์„ค์ •

ํƒ€์ž…โ€‹

EditUrlFnโ€‹

type EditUrlFunction = (params: {
blogDirPath: string;
blogPath: string;
permalink: string;
locale: string;
}) => string | undefined;

ReadingTimeFnโ€‹

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

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

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

FeedTypeโ€‹

type FeedType = 'rss' | 'atom' | 'json';

์„ค์ • ์˜ˆ์‹œโ€‹

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

ํŒ

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

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

docusaurus.config.js
module.exports = {
presets: [
[
'@docusaurus/preset-classic',
{
blog: {
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}) =>
`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,
},
},
},
],
],
};

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

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

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

์˜ต์…˜๋ช…ํƒ€์ž…๊ธฐ๋ณธ๊ฐ’์„ค๋ช…
authorsAuthorsundefined๋ธ”๋กœ๊ทธ ๊ฒŒ์‹œ๋ฌผ ์ž‘์„ฑ์ž๋“ค(๋˜๋Š” ๋‹จ๋… ์ž‘์„ฑ์ž) ๋ชฉ๋ก ์ž์„ธํ•œ ์„ค๋ช…์€ authors ๊ฐ€์ด๋“œ๋ฅผ ์ฐธ์กฐํ•˜์„ธ์š”. ๋ธ”๋กœ๊ทธ ๊ฒŒ์‹œ๋ฌผ ์ž‘์„ฑ์ž๊ฐ€ ํ•œ ๋ช…์ธ ๊ฒฝ์šฐ์—๋„ author_*๋ณด๋‹ค๋Š” authors๋ฅผ ํ”„๋ŸฐํŠธ ๋งคํ„ฐ ํ•„๋“œ๋กœ ๊ถŒ์žฅํ•ฉ๋‹ˆ๋‹ค.
authorstringundefinedโš ๏ธ authors ์‚ฌ์šฉ์„ ๊ถŒ์žฅํ•ฉ๋‹ˆ๋‹ค. ๋ธ”๋กœ๊ทธ ๊ฒŒ์‹œ๋ฌผ ์ž‘์„ฑ์ž ์ด๋ฆ„์ž…๋‹ˆ๋‹ค.
author_urlstringundefinedโš ๏ธ authors ์‚ฌ์šฉ์„ ๊ถŒ์žฅํ•ฉ๋‹ˆ๋‹ค. ์ž‘์„ฑ์ž ์ด๋ฆ„์— ๋งํฌ๋กœ ์—ฐ๊ฒฐ๋  URL์„ ์„ค์ •ํ•ฉ๋‹ˆ๋‹ค. ๊นƒํ—ˆ๋ธŒ๋‚˜ ํŠธ์œ„ํ„ฐ, ํŽ˜์ด์Šค๋ถ ํ”„๋กœํ•„ ๋“ฑ์„ ์—ฐ๊ฒฐํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
author_image_urlstringundefinedโš ๏ธ authors ์‚ฌ์šฉ์„ ๊ถŒ์žฅํ•ฉ๋‹ˆ๋‹ค. ์ž‘์„ฑ์ž ์ธ๋„ค์ผ ์ด๋ฏธ์ง€ URL์„ ์„ค์ •ํ•ฉ๋‹ˆ๋‹ค.
author_titlestringundefinedโš ๏ธ authors ์‚ฌ์šฉ์„ ๊ถŒ์žฅํ•ฉ๋‹ˆ๋‹ค. ์ž‘์„ฑ์ž์— ๋Œ€ํ•œ ์„ค๋ช…์ž…๋‹ˆ๋‹ค.
titlestring๋งˆํฌ๋‹ค์šด ํŒŒ์ผ๋ธ”๋กœ๊ทธ ๊ฒŒ์‹œ๋ฌผ ์ œ๋ชฉ
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<head> ํƒœ๊ทธ ๋‚ด์— <meta name="keywords" content="keyword1,keyword2,..."/> ํ˜•ํƒœ๋กœ ์ƒ์„ฑ๋˜๋Š” ํ‚ค์›Œ๋“œ ๋ฉ”ํƒ€ ํƒœ๊ทธ๋ฅผ ์„ค์ •ํ•ฉ๋‹ˆ๋‹ค. ๊ฒ€์ƒ‰ ์—”์ง„์—์„œ ์‚ฌ์šฉํ•ฉ๋‹ˆ๋‹ค.
descriptionstring๋งˆํฌ๋‹ค์šด ์ฝ˜ํ…์ธ  ์ฒซ ๋ฒˆ์งธ ์ค„๋ฌธ์„œ์˜ ์„ค๋ช…์€ ๊ฒ€์ƒ‰์—”์ง„์—์„œ ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ๊ฒŒ <head> ํƒœ๊ทธ ์•ˆ์— <meta name="description" content="..."/>์™€ <meta property="og:description" content="..."/>๋กœ ์ฒ˜๋ฆฌ๋ฉ๋‹ˆ๋‹ค.
imagestringundefined๊ฒŒ์‹œ๊ธ€์— ๋Œ€ํ•œ ๋งํฌ๋ฅผ ํ‘œ์‹œํ•  ๋•Œ ๋ณด์—ฌ์ง€๋Š” ์ปค๋ฒ„ ๋˜๋Š” ์„ฌ๋„ค์ผ ์ด๋ฏธ์ง€๋ฅผ ์„ค์ •ํ•ฉ๋‹ˆ๋‹ค.
slugstringํŒŒ์ผ ๊ฒฝ๋กœ๋ธ”๋กœ๊ทธ ํฌ์ŠคํŠธ 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 front matter 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