Skip to main content
버전: 3.8.1

📦 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.

설치

npm install --save @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.

설정

설정할 수 있는 필드

옵션명타입기본값설명
pathstring'blog'사이트 디렉토리에 상대적인 파일 시스템의 블로그 콘텐츠 디렉토리 경로입니다.
editUrlstring | EditUrlFnundefined사이트를 편집하기 위한 Base URL입니다. The final URL is computed by editUrl + relativePostPath. 옵션 사용 시 각 파일에 대한 세밀한 제어를 할 수 있습니다. 해당 필드를 설정하지 않으면 편집 링크가 비활성화됩니다.
editLocalizedFilesbooleanfalse편집 URL은 현지화되지 않은 원본 파일 대신 현지화된 파일을 대상으로 합니다. Ignored when editUrl is a function.
blogTitlestring'Blog'더 나은 SEO를 위한 블로그 페이지 제목
blogDescriptionstring'Blog'더 나은 SEO를 위한 블로그 페이지 메타 설명
blogSidebarCountnumber | 'ALL'5블로그 사이드바에 표시할 블로그 게시물 수입니다. 'ALL' to show all blog posts; 0 to disable.
blogSidebarTitlestring'Recent posts'블로그 사이드바 제목
routeBasePathstring'blog'사이트 블로그 섹션에 대한 URL 라우트 DO NOT include a trailing slash. Use / to put the blog at root path.
tagsBasePathstring'tags'블로그 태그 섹션에 대한 URL 라우트 Will be appended to routeBasePath.
pageBasePathstring'page'URL route for the pages section of your blog. Will be appended to routeBasePath.
archiveBasePathstring | null'archive'블로그 아카이브 섹션에 대한 URL 라우트 Will be appended to routeBasePath. DO NOT include a trailing slash. Use null to disable generation of archive.
authorsBasePathstring'authors'URL route for the authors pages of your blog. Will be appended to path.
includestring[]['**/*.{md,mdx}']콘텐츠 경로를 기준으로 빌드할 마크다운 파일과 일치하는 glob 패턴 배열입니다.
excludestring[]See example configuration제외할 마크다운 파일과 일치하는 glob 패턴 배열입니다. Serves as refinement based on the include option.
postsPerPagenumber | 'ALL'10목록 페이지에서 페이지 당 표시할 게시물 수입니다. Use 'ALL' to display all posts on one listing page.
blogListComponentstring'@theme/BlogListPage'블로그 목록 페이지의 루트 컴포넌트
blogPostComponentstring'@theme/BlogPostPage'각 블로그 게시물 페이지의 루트 컴포넌트
blogTagsListComponentstring'@theme/BlogTagsListPage'태그 목록 페이지의 루트 컴포넌트
blogTagsPostsComponentstring'@theme/BlogTagsPostsPage'"태그를 포함한 게시물" 페이지의 루트 컴포넌트
blogArchiveComponentstring'@theme/BlogArchivePage'블로그 아카이브 페이지의 루트 컴포넌트
blogAuthorsPostsComponentstring'@theme/Blog/Pages/BlogAuthorsPostsPage'Root component of the blog author page.
blogAuthorsListComponentstring'@theme/Blog/Pages/BlogAuthorsListPage'Root component of the blog authors page index.
remarkPluginsany[][]MDX에 전달된 Remark 플러그인
rehypePluginsany[][]MDX에 전달된 Rehype 플러그인
rehypePluginsany[][]Recma plugins passed to MDX.
beforeDefaultRemarkPluginsany[][]기본 도큐사우루스 Remark 플러그인보다 먼저 MDX에 전달된 사용자 지정 Remark 플러그인
beforeDefaultRehypePluginsany[][]기본 도큐사우루스 Rehype 플러그인보다 먼저 MDX에 전달된 사용자 지정 Rehype 플러그인
truncateMarkerRegExp/<!--\s*truncate\s*-->/ | \{\/\*\s*truncate\s*\*\/\}/요약이 끝나는 곳을 표시하는 Truncate marker
showReadingTimebooleantrue블로그 게시물의 예상 읽기 시간을 표시
readingTimeReadingTimeFn기본 읽기 시간표시되는 읽기 시간 숫자를 사용자 지정하기 위한 콜백
authorsMapPathstring'authors.yml'블로그 콘텐츠 디렉토리에 상대적인 작성자 맵 파일 경로
feedOptionsSee below{type: ['rss', 'atom']}블로그 피드
feedOptions.typeFeedType | FeedType[] | 'all' | nullRequired생성할 피드 유형입니다. Use null to disable generation.
feedOptions.createFeedItemsCreateFeedItemsFn | undefinedundefined피드 항목을 변환하거나 필터링할 때 사용할 수 있는 선택 기능
feedOptions.limitnumber | null | false20Limits the feed to the specified number of posts, false or null for all entries. Defaults to 20.
feedOptions.titlestringsiteConfig.title피드 제목
feedOptions.descriptionstring`${siteConfig.title} Blog`피드 설명
feedOptions.copyrightstringundefined저작권 문구
feedOptions.xsltboolean | FeedXSLTOptionsundefinedPermits to style the blog XML feeds with XSLT so that browsers render them nicely.
feedOptions.languagestring (See documentation for possible values)undefined피드 언어 메타데이터
sortPosts'descending' | 'ascending' 'descending'블로그 게시물 정렬 순서 설정
processBlogPostsProcessBlogPostsFnundefinedAn optional function which can be used to transform blog posts (filter, modify, delete, etc...).
showLastUpdateAuthorbooleanfalseWhether to display the author who last updated the blog post.
showLastUpdateTimebooleanfalseWhether 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.
tagsstring | false | null | undefinedtags.ymlPath to the YAML tags file listing pre-defined tags. Relative to the blog content directory.
onInlineTags'ignore' | 'log' | 'warn' | 'throw'warnThe 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'warnThe plugin behavior when blog posts do not contain a truncate marker.

타입

EditUrlFn

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