๐ฆ plugin-content-blog
Provides the Blog feature and is the default blog plugin for Docusaurus.
some features production only
The feed feature works by extracting the build output, and is only active in production.
Installationโ
- npm
- Yarn
- pnpm
npm install --save @docusaurus/plugin-content-blog
yarn add @docusaurus/plugin-content-blog
pnpm add @docusaurus/plugin-content-blog
ํ
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โ
์ค์ ํ ์ ์๋ ํ๋
์ต์ ๋ช | ํ์ | ๊ธฐ๋ณธ๊ฐ | ์ค๋ช |
---|---|---|---|
path | string | 'blog' | ์ฌ์ดํธ ๋๋ ํ ๋ฆฌ์ ์๋์ ์ธ ํ์ผ ์์คํ ์ ๋ธ๋ก๊ทธ ์ฝํ ์ธ ๋๋ ํ ๋ฆฌ ๊ฒฝ๋ก์ ๋๋ค. |
editUrl | string | EditUrlFn | undefined | ์ฌ์ดํธ๋ฅผ ํธ์งํ๊ธฐ ์ํ Base URL์
๋๋ค. The final URL is computed by editUrl + relativePostPath . ์ต์
์ฌ์ฉ ์ ๊ฐ ํ์ผ์ ๋ํ ์ธ๋ฐํ ์ ์ด๋ฅผ ํ ์ ์์ต๋๋ค. ํด๋น ํ๋๋ฅผ ์ค์ ํ์ง ์์ผ๋ฉด ํธ์ง ๋งํฌ๊ฐ ๋นํ์ฑํ๋ฉ๋๋ค. |
editLocalizedFiles | boolean | false | ํธ์ง URL์ ํ์งํ๋์ง ์์ ์๋ณธ ํ์ผ ๋์ ํ์งํ๋ ํ์ผ์ ๋์์ผ๋ก ํฉ๋๋ค. Ignored when editUrl is a function. |
blogTitle | string | 'Blog' | ๋ ๋์ SEO๋ฅผ ์ํ ๋ธ๋ก๊ทธ ํ์ด์ง ์ ๋ชฉ |
blogDescription | string | 'Blog' | ๋ ๋์ SEO๋ฅผ ์ํ ๋ธ๋ก๊ทธ ํ์ด์ง ๋ฉํ ์ค๋ช |
blogSidebarCount | number | 'ALL' | 5 | ๋ธ๋ก๊ทธ ์ฌ์ด๋๋ฐ์ ํ์ํ ๋ธ๋ก๊ทธ ๊ฒ์๋ฌผ ์์
๋๋ค. 'ALL' to show all blog posts; 0 to disable. |
blogSidebarTitle | string | 'Recent posts' | ๋ธ๋ก๊ทธ ์ฌ์ด๋๋ฐ ์ ๋ชฉ |
routeBasePath | string | 'blog' | ์ฌ์ดํธ ๋ธ๋ก๊ทธ ์น์
์ ๋ํ URL ๋ผ์ฐํธ DO NOT include a trailing slash. Use / to put the blog at root path. |
tagsBasePath | string | 'tags' | ๋ธ๋ก๊ทธ ํ๊ทธ ์น์
์ ๋ํ URL ๋ผ์ฐํธ Will be appended to routeBasePath . DO NOT include a trailing slash. |
archiveBasePath | string | null | 'archive' | ๋ธ๋ก๊ทธ ์์นด์ด๋ธ ์น์
์ ๋ํ URL ๋ผ์ฐํธ Will be appended to routeBasePath . DO NOT include a trailing slash. Use null to disable generation of archive. |
include | string[] | ['**/*.{md,mdx}'] | ์ฝํ ์ธ ๊ฒฝ๋ก๋ฅผ ๊ธฐ์ค์ผ๋ก ๋น๋ํ ๋งํฌ๋ค์ด ํ์ผ๊ณผ ์ผ์นํ๋ glob ํจํด ๋ฐฐ์ด์ ๋๋ค. |
exclude | string[] | See example configuration | ์ ์ธํ ๋งํฌ๋ค์ด ํ์ผ๊ณผ ์ผ์นํ๋ glob ํจํด ๋ฐฐ์ด์
๋๋ค. Serves as refinement based on the include option. |
postsPerPage | number | 'ALL' | 10 | ๋ชฉ๋ก ํ์ด์ง์์ ํ์ด์ง ๋น ํ์ํ ๊ฒ์๋ฌผ ์์
๋๋ค. Use 'ALL' to display all posts on one listing page. |
blogListComponent | string | '@theme/BlogListPage' | ๋ธ๋ก๊ทธ ๋ชฉ๋ก ํ์ด์ง์ ๋ฃจํธ ์ปดํฌ๋ํธ |
blogPostComponent | string | '@theme/BlogPostPage' | ๊ฐ ๋ธ๋ก๊ทธ ๊ฒ์๋ฌผ ํ์ด์ง์ ๋ฃจํธ ์ปดํฌ๋ํธ |
blogTagsListComponent | string | '@theme/BlogTagsListPage' | ํ๊ทธ ๋ชฉ๋ก ํ์ด์ง์ ๋ฃจํธ ์ปดํฌ๋ํธ |
blogTagsPostsComponent | string | '@theme/BlogTagsPostsPage' | "ํ๊ทธ๋ฅผ ํฌํจํ ๊ฒ์๋ฌผ" ํ์ด์ง์ ๋ฃจํธ ์ปดํฌ๋ํธ |
blogArchiveComponent | string | '@theme/BlogArchivePage' | ๋ธ๋ก๊ทธ ์์นด์ด๋ธ ํ์ด์ง์ ๋ฃจํธ ์ปดํฌ๋ํธ |
remarkPlugins | any[] | [] | MDX์ ์ ๋ฌ๋ Remark ํ๋ฌ๊ทธ์ธ |
rehypePlugins | any[] | [] | MDX์ ์ ๋ฌ๋ Rehype ํ๋ฌ๊ทธ์ธ |
beforeDefaultRemarkPlugins | any[] | [] | ๊ธฐ๋ณธ ๋ํ์ฌ์ฐ๋ฃจ์ค Remark ํ๋ฌ๊ทธ์ธ๋ณด๋ค ๋จผ์ MDX์ ์ ๋ฌ๋ ์ฌ์ฉ์ ์ง์ Remark ํ๋ฌ๊ทธ์ธ |
beforeDefaultRehypePlugins | any[] | [] | ๊ธฐ๋ณธ ๋ํ์ฌ์ฐ๋ฃจ์ค Rehype ํ๋ฌ๊ทธ์ธ๋ณด๋ค ๋จผ์ MDX์ ์ ๋ฌ๋ ์ฌ์ฉ์ ์ง์ Rehype ํ๋ฌ๊ทธ์ธ |
truncateMarker | RegExp | /<!--\s*(truncate)\s*-->/ | ์์ฝ์ด ๋๋๋ ๊ณณ์ ํ์ํ๋ Truncate marker |
showReadingTime | boolean | true | ๋ธ๋ก๊ทธ ๊ฒ์๋ฌผ์ ์์ ์ฝ๊ธฐ ์๊ฐ์ ํ์ |
readingTime | ReadingTimeFn | ๊ธฐ๋ณธ ์ฝ๊ธฐ ์๊ฐ | ํ์๋๋ ์ฝ๊ธฐ ์๊ฐ ์ซ์๋ฅผ ์ฌ์ฉ์ ์ง์ ํ๊ธฐ ์ํ ์ฝ๋ฐฑ |
authorsMapPath | string | 'authors.yml' | ๋ธ๋ก๊ทธ ์ฝํ ์ธ ๋๋ ํ ๋ฆฌ์ ์๋์ ์ธ ์์ฑ์ ๋งต ํ์ผ ๊ฒฝ๋ก |
feedOptions | See below | {type: ['rss', 'atom']} | ๋ธ๋ก๊ทธ ํผ๋ |
feedOptions.type | FeedType | FeedType[] | 'all' | null | Required | ์์ฑํ ํผ๋ ์ ํ์
๋๋ค. Use null to disable generation. |
feedOptions.createFeedItems | CreateFeedItemsFn | undefined | undefined | ํผ๋ ํญ๋ชฉ์ ๋ณํํ๊ฑฐ๋ ํํฐ๋งํ ๋ ์ฌ์ฉํ ์ ์๋ ์ ํ ๊ธฐ๋ฅ |
feedOptions.title | string | siteConfig.title | ํผ๋ ์ ๋ชฉ |
feedOptions.description | string | `${siteConfig.title} Blog` | ํผ๋ ์ค๋ช |
feedOptions.copyright | string | undefined | ์ ์๊ถ ๋ฌธ๊ตฌ |
feedOptions.language | string (See documentation for possible values) | undefined | ํผ๋ ์ธ์ด ๋ฉํ๋ฐ์ดํฐ |
sortPosts | 'descending' | 'ascending' | 'descending' | ๋ธ๋ก๊ทธ ๊ฒ์๋ฌผ ์ ๋ ฌ ์์ ์ค์ |