跳到主要内容
版本:2.4.3

📦 theme-live-codeblock

This theme provides a @theme/CodeBlock component that is powered by react-live. You can read more on interactive code editor documentation.

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

Configuration

docusaurus.config.js
module.exports = {
plugins: ['@docusaurus/theme-live-codeblock'],
themeConfig: {
liveCodeBlock: {
/**
* 实时效果显示的位置,在编辑器上方还是下方。
* 可为:"top" | "bottom"
*/
playgroundPosition: 'bottom',
},
},
};