📦 theme-live-codeblock
このテーマでは、react-liveを利用した@theme/CodeBlock
コンポーネントを提供しています。詳細については、対話型コードエディターのドキュメントを参照してください。
- npm
- Yarn
- pnpm
npm install --save @docusaurus/theme-live-codeblock
yarn add @docusaurus/theme-live-codeblock
pnpm add @docusaurus/theme-live-codeblock
構成
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',
},
},
};