docusaurus/website/versioned_docs/version-2.0.0-beta.20/api/themes/theme-live-codeblock.md
2022-05-05 20:26:48 +02:00

818 B

sidebar_position id title slug
3 theme-live-codeblock 📦 theme-live-codeblock /api/themes/@docusaurus/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

module.exports = {
  plugins: ['@docusaurus/theme-live-codeblock'],
  themeConfig: {
    liveCodeBlock: {
      /**
       * The position of the live playground, above or under the editor
       * Possible values: "top" | "bottom"
       */
      playgroundPosition: 'bottom',
    },
  },
};