Skip to main content

[note] Docusaurus 筆記

V2.0.0-alpha.56

建立專案#

$ npx @docusaurus/init@next init <website-name> classic
$ npx docusaurus --version

設定#

// docusaurus.config.js
themes: [
require.resolve('@docusaurus/theme-live-codeblock'),
require.resolve('@docusaurus/theme-search-algolia'),
require.resolve('@docusaurus/theme-classic'), // 不加有些程式碼高亮無法正常顯示
],

theme#

@docusaurus/theme-classic#

@docusaurus/theme-classic @ v2.alpha

使用 algolia search#

// docusaurus.config.js
themes: [require.resolve('@docusaurus/theme-search-algolia')];
Last updated on