๐ฆ plugin-content-blog
๋ธ๋ก๊ทธ ๋ง๋ค๊ธฐ ๊ธฐ๋ฅ์ ์ ๊ณตํ๋ ๋ํ์ฌ์ฐ๋ฃจ์ค์ ๊ธฐ๋ณธ ๋ธ๋ก๊ทธ ํ๋ฌ๊ทธ์ธ์ ๋๋ค.
ํผ๋ ๊ธฐ๋ฅ์ ๋น๋ ์ฐ์ถ๋ฌผ์์๋ง ์๋ํ๋ฉฐ ์ ํ ๋ฒ์ ์์๋ง ํ์ฑํ๋ฉ๋๋ค.
์ค์นโ
- npm
- Yarn
- pnpm
npm install --save @docusaurus/plugin-content-blog
yarn add @docusaurus/plugin-content-blog
pnpm add @docusaurus/plugin-content-blog
@docusaurus/preset-classic
์ ์ค์นํ ๊ฒฝ์ฐ์๋ ํ๋ฌ๊ทธ์ธ์ ๋ฐ๋ก ์ค์นํ ํ์๋ ์์ต๋๋ค.
You can configure this plugin through the preset options.
์ค์ โ
์ค์ ํ ์ ์๋ ํ๋
์ต์ ๋ช | ํ์ | ๊ธฐ๋ณธ๊ฐ | ์ค๋ช |
---|---|---|---|
path | string | 'blog' | ์ฌ์ดํธ ๋๋ ํ ๋ฆฌ์ ์๋์ ์ธ ํ์ผ ์์คํ ์ ๋ธ๋ก๊ทธ ์ฝํ ์ธ ๋๋ ํ ๋ฆฌ ๊ฒฝ๋ก์ ๋๋ค. |
editUrl | string | EditUrlFn | undefined | ์ฌ์ดํธ๋ฅผ ํธ์งํ๊ธฐ ์ํ Base URL์
๋๋ค. ์ต์ข
URL์ editUrl + relativePostPath ํํ๋ก ์ฒ๋ฆฌ๋ฉ๋๋ค. ์ต์
์ฌ์ฉ ์ ๊ฐ ํ์ผ์ ๋ํ ์ธ๋ฐํ ์ ์ด๋ฅผ ํ ์ ์์ต๋๋ค. ํด๋น ํ๋๋ฅผ ์ค์ ํ์ง ์์ผ๋ฉด ํธ์ง ๋งํฌ๊ฐ ๋นํ์ฑํ๋ฉ๋๋ค. |
editLocalizedFiles | boolean | false | ํธ์ง URL์ ํ์งํ๋์ง ์์ ์๋ณธ ํ์ผ ๋์ ํ์งํ๋ ํ์ผ์ ๋์์ผ๋ก ํฉ๋๋ค. editUrl ์ด ํจ์์ธ ๊ฒฝ์ฐ์๋ ๋ฌด์ํฉ๋๋ค. |
blogTitle | string | 'Blog' | ๋ ๋์ SEO๋ฅผ ์ํ ๋ธ๋ก๊ทธ ํ์ด์ง ์ ๋ชฉ |
blogDescription | string | 'Blog' | ๋ ๋์ SEO๋ฅผ ์ํ ๋ธ๋ก๊ทธ ํ์ด์ง ๋ฉํ ์ค๋ช |
blogSidebarCount | number | 'ALL' | 5 | ๋ธ๋ก๊ทธ ์ฌ์ด๋๋ฐ์ ํ์ํ ๋ธ๋ก๊ทธ ๊ฒ์๋ฌผ ์์
๋๋ค. ๋ชจ๋ ๋ธ๋ก๊ทธ ๊ฒ์๋ฌผ์ ํ์ํ๋ ค๋ฉด 'ALL' , ๊ฐ์ถ๋ ค๋ฉด 0 |
blogSidebarTitle | string | 'Recent posts' | ๋ธ๋ก๊ทธ ์ฌ์ด๋๋ฐ ์ ๋ชฉ |
routeBasePath | string | 'blog' | ์ฌ์ดํธ ๋ธ๋ก๊ทธ ์น์
์ ๋ํ URL ๋ผ์ฐํธ ํธ๋ ์ผ๋ง ์ฌ๋์๋ฅผ ํฌํจํ์ง ๋ง์ธ์. ๋ธ๋ก๊ทธ๋ฅผ ๋ฃจํธ ๊ฒฝ๋ก๋ก ์ค์ ํ ๋๋ง / ๋ฅผ ์ฌ์ฉํฉ๋๋ค. |
tagsBasePath | string | 'tags' | ๋ธ๋ก๊ทธ ํ๊ทธ ์น์
์ ๋ํ URL ๋ผ์ฐํธ routeBasePath ์ ์ถ๊ฐ๋ฉ๋๋ค. |
pageBasePath | string | 'page' | URL route for the pages section of your blog. routeBasePath ์ ์ถ๊ฐ๋ฉ๋๋ค. |
archiveBasePath | string | null | 'archive' | ๋ธ๋ก๊ทธ ์์นด์ด๋ธ ์น์
์ ๋ํ URL ๋ผ์ฐํธ routeBasePath ์ ์ถ๊ฐ๋ฉ๋๋ค. ํธ๋ ์ผ๋ง ์ฌ๋์๋ฅผ ํฌํจํ์ง ๋ง์ธ์. ์์นด์ด๋ธ ์์ฑ์ ํ์ง ์์ผ๋ ค๋ฉด null ๋ก ์ค์ ํฉ๋๋ค. |
authorsBasePath | string | 'authors' | URL route for the authors pages of your blog. Will be appended to path . |
include | string[] | ['**/*.{md,mdx}'] | ์ฝํ ์ธ ๊ฒฝ๋ก๋ฅผ ๊ธฐ์ค์ผ๋ก ๋น๋ํ ๋งํฌ๋ค์ด ํ์ผ๊ณผ ์ผ์นํ๋ glob ํจํด ๋ฐฐ์ด์ ๋๋ค. |
exclude | string[] | ์ค์ ์์๋ฅผ ์ฐธ์กฐํ์ธ์ | ์ ์ธํ ๋งํฌ๋ค์ด ํ์ผ๊ณผ ์ผ์นํ๋ glob ํจํด ๋ฐฐ์ด์
๋๋ค. include ์ต์
์ ์ข ๋ ์ธ๋ถํํ๋ ์ญํ ์ ํฉ๋๋ค. |
postsPerPage | number | 'ALL' | 10 | ๋ชฉ๋ก ํ์ด์ง์์ ํ์ด์ง ๋น ํ์ํ ๊ฒ์๋ฌผ ์์
๋๋ค. ํ๋์ ๋ชฉ๋ก ํ์ด์ง์ ๋ชจ๋ ๊ฒ์๋ฌผ์ ํ์ํ๋ ค๋ฉด 'ALL' ์ ์ค์ ํฉ๋๋ค. |
blogListComponent | string | '@theme/BlogListPage' | ๋ธ๋ก๊ทธ ๋ชฉ๋ก ํ์ด์ง์ ๋ฃจํธ ์ปดํฌ๋ํธ |
blogPostComponent | string | '@theme/BlogPostPage' | ๊ฐ ๋ธ๋ก๊ทธ ๊ฒ์๋ฌผ ํ์ด์ง์ ๋ฃจํธ ์ปดํฌ๋ํธ |
blogTagsListComponent | string | '@theme/BlogTagsListPage' | ํ๊ทธ ๋ชฉ๋ก ํ์ด์ง์ ๋ฃจํธ ์ปดํฌ๋ํธ |
blogTagsPostsComponent | string | '@theme/BlogTagsPostsPage' | "ํ๊ทธ๋ฅผ ํฌํจํ ๊ฒ์๋ฌผ" ํ์ด์ง์ ๋ฃจํธ ์ปดํฌ๋ํธ |
blogArchiveComponent | string | '@theme/BlogArchivePage' | ๋ธ๋ก๊ทธ ์์นด์ด๋ธ ํ์ด์ง์ ๋ฃจํธ ์ปดํฌ๋ํธ |
blogAuthorsPostsComponent | string | '@theme/Blog/Pages/BlogAuthorsPostsPage' | Root component of the blog author page. |
blogAuthorsListComponent | string | '@theme/Blog/Pages/BlogAuthorsListPage' | Root component of the blog authors page index. |
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 ํ๋ฌ๊ทธ์ธ |
truncateMarker | RegExp | /<!--\s*truncate\s*-->/ \ | \{\/\*\s*truncate\s*\*\/\}/ |
showReadingTime | boolean | true | ๋ธ๋ก๊ทธ ๊ฒ์๋ฌผ์ ์์ ์ฝ๊ธฐ ์๊ฐ์ ํ์ |
readingTime | ReadingTimeFn | ๊ธฐ๋ณธ ์ฝ๊ธฐ ์๊ฐ | ํ์๋๋ ์ฝ๊ธฐ ์๊ฐ ์ซ์๋ฅผ ์ฌ์ฉ์ ์ง์ ํ๊ธฐ ์ํ ์ฝ๋ฐฑ |
authorsMapPath | string | 'authors.yml' | ๋ธ๋ก๊ทธ ์ฝํ ์ธ ๋๋ ํ ๋ฆฌ์ ์๋์ ์ธ ์์ฑ์ ๋งต ํ์ผ ๊ฒฝ๋ก |
feedOptions | ์๋๋ฅผ ์ฐธ์กฐํ์ธ์. | {type: ['rss', 'atom']} | ๋ธ๋ก๊ทธ ํผ๋ |
feedOptions.type | FeedType | FeedType[] | 'all' | null | ํ์ | ์์ฑํ ํผ๋ ์ ํ์
๋๋ค. ์์ฑ์ ํ์ง ์์ผ๋ ค๋ฉด null ๋ก ์ค์ ํฉ๋๋ค. |
feedOptions.createFeedItems | CreateFeedItemsFn | undefined | undefined | ํผ๋ ํญ๋ชฉ์ ๋ณํํ๊ฑฐ๋ ํํฐ๋งํ ๋ ์ฌ์ฉํ ์ ์๋ ์ ํ ๊ธฐ๋ฅ |
feedOptions.limit | number | null | false | 20 | Limits the feed to the specified number of posts, false or null for all entries. Defaults to 20 . |
feedOptions.title | string | siteConfig.title | ํผ๋ ์ ๋ชฉ |
feedOptions.description | string | `${siteConfig.title} Blog` | ํผ๋ ์ค๋ช |
feedOptions.copyright | string | undefined | ์ ์๊ถ ๋ฌธ๊ตฌ |
feedOptions.xslt | boolean | FeedXSLTOptions | undefined | Permits to style the blog XML feeds with XSLT so that browsers render them nicely. |
feedOptions.language | string (์ฌ์ฉํ ์ ์๋ ๊ฐ์ ๋ฌธ์๋ฅผ ์ฐธ๊ณ ) | undefined | ํผ๋ ์ธ์ด ๋ฉํ๋ฐ์ดํฐ |
sortPosts | 'descending' | 'ascending' | 'descending' | ๋ธ๋ก๊ทธ ๊ฒ์๋ฌผ ์ ๋ ฌ ์์ ์ค์ |
processBlogPosts | ProcessBlogPostsFn | undefined | An optional function which can be used to transform blog posts (filter, modify, delete, etc...). |
showLastUpdateAuthor | boolean | false | Whether to display the author who last updated the blog post. |
showLastUpdateTime | boolean | false | Whether to display the last date the blog post 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 . |
tags | string | false | null | undefined | tags.yml | Path to the YAML tags file listing pre-defined tags. Relative to the blog content directory. |
onInlineTags | 'ignore' | 'log' | 'warn' | 'throw' | warn | The plugin behavior when blog posts contain inline tags (not appearing in the list of pre-defined tags, usually tags.yml ). |
onUntruncatedBlogPosts | 'ignore' | 'log' | 'warn' | 'throw' | warn | The plugin behavior when blog posts do not contain a truncate marker. |
ํ์ โ
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';
FeedXSLTOptions
โ
Permits to style the blog XML feeds so that browsers render them nicely with XSLT.
- Use
true
to let the blog use its built-in.xsl
and.css
files to style the blog feed - Use a falsy value (
undefined | null | false
) to disable the feature - Use a
string
to provide a file path to a custom.xsl
file relative to the blog content folder. By convention, you must provide a.css
file with the exact same name.
type FeedXSLTOptions =
| boolean
| undefined
| null
| {
rss?: string | boolean | null | undefined;
atom?: string | boolean | null | undefined;
};
CreateFeedItemsFn
โ
type CreateFeedItemsFn = (params: {
blogPosts: BlogPost[];
siteConfig: DocusaurusConfig;
outDir: string;
defaultCreateFeedItemsFn: CreateFeedItemsFn;
}) => Promise<BlogFeedItem[]>;
ProcessBlogPostsFn
โ
type ProcessBlogPostsFn = (params: {
blogPosts: BlogPost[];
}) => Promise<void | BlogPost[]>;
์ค์ ์์โ
ํ๋ฆฌ์ ์ต์ ์ด๋ ํ๋ฌ๊ทธ์ธ ์ต์ ์์ ํ๋ฌ๊ทธ์ธ์ ์ค์ ํ ์ ์์ต๋๋ค.
๋๋ถ๋ถ์ ๋ํ์ฌ์ฐ๋ฃจ์ค ์ฌ์ฉ์๋ ํ๋ฆฌ์ ์ต์ ์ ์ฌ์ฉํด ํ๋ฌ๊ทธ์ธ์ ์ค์ ํฉ๋๋ค.
- ํ๋ฆฌ์ ์ต์
- ํ๋ฌ๊ทธ์ธ ์ต์
ํ๋ฆฌ์ ์ ์ฌ์ฉํ๋ ๊ฒฝ์ฐ ํ๋ฆฌ์ ์ต์ ๋ฅผ ํตํด ํ๋ฌ๊ทธ์ธ์ ๊ตฌ์ฑํฉ๋๋ค.
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('./my-remark-plugin')],
rehypePlugins: [],
beforeDefaultRemarkPlugins: [],
beforeDefaultRehypePlugins: [],
truncateMarker: /<!--\s*(truncate)\s*-->/,
showReadingTime: true,
feedOptions: {
type: '',
title: '',
description: '',
copyright: '',
language: undefined,
createFeedItems: async (params) => {
const {blogPosts, defaultCreateFeedItems, ...rest} = params;
return defaultCreateFeedItems({
// keep only the 10 most recent blog posts in the feed
blogPosts: blogPosts.filter((item, index) => index < 10),
...rest,
});
},
},
},
},
],
],
};
๋ ๋ฆฝ์ ์ผ๋ก ์คํ๋๋ ํ๋ฌ๊ทธ์ธ์ ์ฌ์ฉํ๋ ๊ฒฝ์ฐ์๋ ํ๋ฌ๊ทธ์ธ์ ๋ํ ์ต์ ์ ์ง์ ์ค์ ํ ์ ์์ต๋๋ค.
module.exports = {
plugins: [
[
'@docusaurus/plugin-content-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('./my-remark-plugin')],
rehypePlugins: [],
beforeDefaultRemarkPlugins: [],
beforeDefaultRehypePlugins: [],
truncateMarker: /<!--\s*(truncate)\s*-->/,
showReadingTime: true,
feedOptions: {
type: '',
title: '',
description: '',
copyright: '',
language: undefined,
createFeedItems: async (params) => {
const {blogPosts, defaultCreateFeedItems, ...rest} = params;
return defaultCreateFeedItems({
// keep only the 10 most recent blog posts in the feed
blogPosts: blogPosts.filter((item, index) => index < 10),
...rest,
});
},
},
},
],
],
};
๋งํฌ๋ค์ด ํ๋ฐํธ ๋งคํฐโ
Markdown documents can use the following Markdown front matter metadata fields, enclosed by a line ---
on either side.
์ค์ ํ ์ ์๋ ํ๋
์ต์ ๋ช | ํ์ | ๊ธฐ๋ณธ๊ฐ | ์ค๋ช |
---|---|---|---|
authors | Authors | undefined | ๋ธ๋ก๊ทธ ๊ฒ์๋ฌผ ์์ฑ์๋ค(๋๋ ๋จ๋
์์ฑ์) ๋ชฉ๋ก ์์ธํ ์ค๋ช
์ authors ๊ฐ์ด๋๋ฅผ ์ฐธ์กฐํ์ธ์. ๋ธ๋ก๊ทธ ๊ฒ์๋ฌผ ์์ฑ์๊ฐ ํ ๋ช
์ธ ๊ฒฝ์ฐ์๋ author_* ๋ณด๋ค๋ authors ๋ฅผ ํ๋ฐํธ ๋งคํฐ ํ๋๋ก ๊ถ์ฅํฉ๋๋ค. |
author | string | undefined | โ ๏ธ authors ์ฌ์ฉ์ ๊ถ์ฅํฉ๋๋ค. ๋ธ๋ก๊ทธ ๊ฒ์๋ฌผ ์์ฑ์ ์ด๋ฆ์
๋๋ค. |
author_url | string | undefined | โ ๏ธ authors ์ฌ์ฉ์ ๊ถ์ฅํฉ๋๋ค. ์์ฑ์ ์ด๋ฆ์ ๋งํฌ๋ก ์ฐ๊ฒฐ๋ URL์ ์ค์ ํฉ๋๋ค. This could be a GitHub, X, Facebook profile URL, etc. |
author_image_url | string | undefined | โ ๏ธ authors ์ฌ์ฉ์ ๊ถ์ฅํฉ๋๋ค. ์์ฑ์ ์ธ๋ค์ผ ์ด๋ฏธ์ง URL์ ์ค์ ํฉ๋๋ค. |
author_title | string | undefined | โ ๏ธ authors ์ฌ์ฉ์ ๊ถ์ฅํฉ๋๋ค. ์์ฑ์์ ๋ํ ์ค๋ช
์
๋๋ค. |
title | string | ๋งํฌ๋ค์ด ํ์ผ | ๋ธ๋ก๊ทธ ๊ฒ์๋ฌผ ์ ๋ชฉ |
sidebar_label | string | title | A custom label for the blog sidebar, replacing the default one (title ). |
date | string | ํ์ผ๋ช ๋๋ ํ์ผ ์์ฑ ์๊ฐ | ๋ธ๋ก๊ทธ ๊ฒ์๋ฌผ ์์ฑ ์๊ฐ. ํด๋น ํ๋๋ฅผ ์ค์ ํ์ง ์์ผ๋ฉด ํ์ผ ๋๋ ํด๋๋ช
์์ ์ถ์ถํ ์ ์์ต๋๋ค. ์๋ฅผ ๋ค๋ฉด ๋ค์๊ณผ ๊ฐ์ ํ์์
๋๋ค. 2021-04-15-blog-post.mdx , 2021-04-15-blog-post/index.mdx , 2021/04/15/blog-post.mdx . ๊ทธ๋ ์ง ์์ผ๋ฉด ๋งํฌ๋ค์ด ํ์ผ์ ์์ฑํ ์๊ฐ์ผ๋ก ์ค์ ๋ฉ๋๋ค. |
tags | Tag[] | undefined | ํฌ์คํธ๋ฅผ ํ๊ทธํ๊ธฐ ์ํ ๋ฌธ์์ด ๋๋ ์ค๋ธ์ ํธ์ ๋ชฉ๋ก์
๋๋ค. label ๊ณผ permalink 2๊ฐ์ ํ๋๋ก ๊ตฌ์ฑ๋ฉ๋๋ค. Strings can be a reference to keys of a tags file (usually tags.yml ) |
draft | boolean | false | ๋น๊ณต๊ฐ ์ค์ ๊ฒ์๋ฌผ์ ๊ฐ๋ฐ ์ํ์์๋ง ํ์ธํ ์ ์์ต๋๋ค. |
unlisted | boolean | false | ๋ชฉ๋ก์ ์๋ ๋ธ๋ก๊ทธ ๊ฒ์๋ฌผ์ ๊ฐ๋ฐ ๋ฐ ์ ํ ์ํ์์ ๋ชจ๋ ํ์ธํ ์ ์์ต๋๋ค. ์ ํ์์ "์จ๊ฒจ์ง" ์ํ๋ผ ์ธ๋ฑ์ค๊ฐ ์์ฑ๋์ง ์๊ณ ์ฌ์ดํธ๋งต์์ ์ ์ธ๋๋ฉฐ ๋งํฌ ์ ๋ณด๋ฅผ ์๊ณ ์๋ ์ฌ์ฉ์๋ง ์ ๊ทผํ ์ ์์ต๋๋ค. |
hide_table_of_contents | boolean | false | ๋ชฉ์ฐจ๋ฅผ ์ค๋ฅธ์ชฝ์ผ๋ก ์จ๊ธธ์ง ์ฌ๋ถ |
toc_min_heading_level | number | 2 | ๋ชฉ์ฐจ์ ํ์๋๋ ์ต์ ์ ๋ชฉ ์์ค์ ๋๋ค. 2์์ 6 ์ฌ์ด์ ๊ฐ์ผ๋ก ์ค์ ํ ์ ์๊ณ ์ต๋๊ฐ๋ณด๋ค ์๊ฑฐ๋ ๊ฐ์์ผ ํฉ๋๋ค. |
toc_max_heading_level | number | 3 | ๋ชฉ์ฐจ์ ํ์๋๋ ์ต๋ ์ ๋ชฉ ์์ค์ ๋๋ค. 2์์ 6 ์ฌ์ด์ ๊ฐ์ผ๋ก ์ค์ ํ ์ ์์ต๋๋ค. |
keywords | string[] | undefined | <head> ํ๊ทธ ๋ด์ <meta name="keywords" content="keyword1,keyword2,..."/> ํํ๋ก ์์ฑ๋๋ ํค์๋ ๋ฉํ ํ๊ทธ๋ฅผ ์ค์ ํฉ๋๋ค. ๊ฒ์ ์์ง์์ ์ฌ์ฉํฉ๋๋ค. |
description | string | ๋งํฌ๋ค์ด ์ฝํ ์ธ ์ฒซ ๋ฒ์งธ ์ค | ๋ฌธ์์ ์ค๋ช
์ ๊ฒ์์์ง์์ ์ฌ์ฉํ ์ ์๊ฒ <head> ํ๊ทธ ์์ <meta name="description" content="..."/> ์ <meta property="og:description" content="..."/> ๋ก ์ฒ๋ฆฌ๋ฉ๋๋ค. |
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 | ํ์ผ ๊ฒฝ๋ก | ๋ธ๋ก๊ทธ ํฌ์คํธ URL์ ๋ณ๊ฒฝํ ์ ์๋๋ก ํ์ฉํฉ๋๋ค(/<routeBasePath>/<slug> ). ์ฌ๋ฌ ํจํด์ ์ค์ ํ ์๋ ์์ต๋๋ค: slug: my-blog-post , slug: /my/path/to/blog/post , slug: / . |
last_update | FrontMatterLastUpdate | undefined | Allows overriding the last update author/date. ์ฌ์ฉํ ์ ์๋ ๋ ์ง ํ์์ parsable date string์ ์ฐธ๊ณ ํ์ธ์. |
type FrontMatterLastUpdate = {date?: string; author?: string};
type Tag = string | {label: string; permalink: string};
// An author key references an author from the global plugin authors.yml file
type AuthorKey = string;
// Social platform name -> Social platform link
// Example: {MyPlatform: 'https://myplatform.com/myusername'}
// Pre-defined platforms ("x", "github", "twitter", "linkedin", "stackoverflow") accept handles:
// Example: {github: 'slorber'}
type AuthorSocials = Record<string, string>;
type Author = {
key?: AuthorKey;
name: string;
title?: string;
url?: string;
image_url?: string;
socials?: AuthorSocials;
};
// The front matter authors field allows various possible shapes
type Authors = AuthorKey | Author | (AuthorKey | Author)[];
์:
---
title: Welcome Docusaurus
authors:
- slorber
- yangshun
- name: Joel Marcey
title: Co-creator of Docusaurus 1
url: https://github.com/JoelMarcey
image_url: https://github.com/JoelMarcey.png
socials:
x: joelmarcey
github: JoelMarcey
tags: [docusaurus]
description: This is my first post on Docusaurus.
image: https://i.imgur.com/mErPwqL.png
hide_table_of_contents: false
---
A Markdown blog post
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
Authors Fileโ
Use the authors
plugin option to configure the path of a YAML authors file.
By convention, the plugin will look for a authors.yml
file at the root of your blog content folder(s).
This file can contain a list of predefined global blog authors. You can reference these authors by their keys in Markdown files thanks to the authors
front matter.
ํ์ โ
The YAML content of the provided authors file should respect the following shape:
type AuthorsMapInput = {
[authorKey: string]: AuthorInput;
};
type AuthorInput = {
name?: string;
title?: string;
description?: string;
imageURL?: string;
url?: string;
email?: string;
page?: boolean | {permalink: string};
socials?: Record<string, string>;
[customAuthorAttribute: string]: unknown;
};
์โ
slorber:
name: Sรฉbastien Lorber
title: Docusaurus maintainer
url: https://sebastienlorber.com
image_url: https://github.com/slorber.png
page: true
socials:
x: sebastienlorber
github: slorber
jmarcey:
name: Joel Marcey
title: Co-creator of Docusaurus 1
url: https://github.com/JoelMarcey
image_url: https://github.com/JoelMarcey.png
email: jimarcey@gmail.com
page:
permalink: '/joel-marcey'
socials:
x: joelmarcey
github: JoelMarcey
---
authors: [slorber, jmarcey]
---
# My Blog Post
Content
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
โ
โ # website/blog์ ๋ํ ๋ฒ์ญ
โโโ authors.yml
โโโ first-blog-post.md
โโโ second-blog-post.md
โ
โ # ๋ ๋๋ง๋ ํ๋ฌ๊ทธ์ธ ์ต์
์ ๋ํ ๋ฒ์ญ
โโโ options.json