📦 theme-live-codeblock
此主题提供由 react-live 所驱动的 @theme/CodeBlock 组件。 您可在交互式代码编辑器文档上了解详情。
- npm
- Yarn
npm install --save @docusaurus/theme-live-codeblockyarn add @docusaurus/theme-live-codeblock配置#
docusaurus.config.js
module.exports = { plugins: ['@docusaurus/theme-live-codeblock'], themeConfig: { liveCodeBlock: { /** * 实时效果显示的位置,可位于编辑器上方或下方。 * 可为:"top" | "bottom" */ playgroundPosition: 'bottom', }, },};