📦 theme-live-codeblock
该主题提供了一个由 react-live 支持的 @theme/CodeBlock
组件。你可以阅读有关 交互式代码编辑器 文档的更多信息。
¥This theme provides a @theme/CodeBlock
component that is powered by react-live. You can read more on interactive code editor documentation.
- npm
- Yarn
- pnpm
npm install --save @docusaurus/theme-live-codeblock
yarn add @docusaurus/theme-live-codeblock
pnpm add @docusaurus/theme-live-codeblock
配置
¥Configuration
docusaurus.config.js
export default {
plugins: ['@docusaurus/theme-live-codeblock'],
themeConfig: {
liveCodeBlock: {
/**
* The position of the live playground, above or under the editor
* Possible values: "top" | "bottom"
*/
playgroundPosition: 'bottom',
},
},
};