Closed3

Docusaurus note

peachypeachy

添加第二個部落格在目錄上

docusaurus.config.js
module.exports = {
...
plugins: [
    [
      '@docusaurus/plugin-content-blog',
      {
        id: 'second-blog',
        routeBasePath: 'my-second-blog',
        path: './my-second-blog',
      },
    ],
  ],
}
peachypeachy

將 Edit this page 隱藏

docusaurus.config.js
module.exports = {
...
presets: [
    [
      '@docusaurus/preset-classic',
      {
        docs: {
          ...
          editUrl: undefined,
        },
      },
    ],
  ],
}
peachypeachy

引入自定義 CSS

docusaurus.config.js
module.exports = {
...
presets: [
    [
      '@docusaurus/preset-classic',
      {
        theme: {
          customCss: [
            require.resolve('./src/css/custom1.css'),
            require.resolve('./src/css/custom2.css'),
          ]
        },
      },
    ],
  ],
}
このスクラップは2021/06/19にクローズされました