메인 컨텐츠로 이동

도큐사우루스 2.1

· 3분 읽기 분량
세바스티앵 로버(Sébastien Lorber)
Docusaurus maintainer, This Week In React editor

We are happy to announce Docusaurus 2.1, our very first minor version release.

업그레이드 과정은 간단합니다. 도큐사우루스는 릴리스 프로세스 문서에 설명된 대로 시맨틱 버전 체계를 준수해 마이너 버전은 하위 호환성을 유지합니다.

Docusaurus 2.1 social card

새로 추가된 기능

DocCardList 기능 개선

In #8008, we simplified the usage of the<DocCardList> component, that is notably used on sidebar category generated index pages.

The items prop is now optional, and will be automatically inferred from the content of the parent sidebar category:

import DocCardList from '@theme/DocCardList';
- import {useCurrentSidebarCategory} from '@docusaurus/theme-common';

- <DocCardList items={useCurrentSidebarCategory().items}/>
+ <DocCardList/>

또한 사이드바 카테고리에 링크되지 않은 일반 문서를 포함한 모든 문서에서 <DocCardList>를 사용할 수 있도록 했습니다.

simplified DocCardList component

noindex improvements

We improved the support of the noindex meta robots directive, a way to signal search engines you don't want a specific page to be indexed.

In #7963, we allow noindex to be configured on a per-docs-version basis.

Use the following plugin options to tell crawlers you don't want the 1.0.0 version to be indexed:

const options = {
versions: {
'1.0.0': {
noIndex: true,
},
},
};

도큐사우루스는 해당 버전의 각 페이지에 다음 메타 태그를 추가합니다.

<meta name="robots" content="noindex, nofollow" />

In #7964, we also fixed a bug where the sitemap plugin would still contain pages that have a noindex directive. Now the sitemap plugin will reliably filter out all the pages containing noindex directives.

기본 메타 태그 재정의

In #7952, it becomes possible to override default html meta tags you couldn't before:

<>
{siteConfig.noIndex && <meta name="robots" content="nofollow, noindex" />}
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
</>

It is now possible to use <Head> or themeConfig.metadata:

  • to override the viewport meta
  • to override the robots meta: you could mark your site as noIndex, but except for specific pages that should be indexed

우크라이나어 번역

In #7953, we added default classic theme translations for the Ukrainian language.

기타 변경

Check the 2.1.0 changelog entry for an exhaustive list of changes.