跳到主要内容

📦 theme-live-codeblock

此主题提供一个由 react-live 提供支持的 @theme/CodeBlock 组件。您可以在 交互式代码编辑器 文档中了解更多信息。

npm install --save @docusaurus/theme-live-codeblock

配置

docusaurus.config.js
export default {
plugins: ['@docusaurus/theme-live-codeblock'],
themeConfig: {
liveCodeBlock: {
/**
* 实时游乐场的显示位置,在编辑器上方或下方
* 可选值:"top" | "bottom"
*/
playgroundPosition: 'bottom',
},
},
};