mirror of
https://github.com/facebook/docusaurus.git
synced 2025-12-26 01:33:02 +00:00
Some checks are pending
Argos CI / take-screenshots (push) Waiting to run
Build Hash Router / Build Hash Router (push) Waiting to run
Canary Release / Publish Canary (push) Waiting to run
CodeQL / Analyze (javascript) (push) Waiting to run
Continuous Releases / Continuous Releases (push) Waiting to run
E2E Tests / E2E — Yarn v1 (18.0) (push) Waiting to run
E2E Tests / E2E — Yarn v1 (20) (push) Waiting to run
E2E Tests / E2E — Yarn v1 (22) (push) Waiting to run
E2E Tests / E2E — Yarn v1 (24) (push) Waiting to run
E2E Tests / E2E — Yarn v1 Windows (push) Waiting to run
E2E Tests / E2E — Yarn Berry (node-modules, -s) (push) Waiting to run
E2E Tests / E2E — Yarn Berry (node-modules, -st) (push) Waiting to run
E2E Tests / E2E — Yarn Berry (pnp, -s) (push) Waiting to run
E2E Tests / E2E — Yarn Berry (pnp, -st) (push) Waiting to run
E2E Tests / E2E — npm (push) Waiting to run
E2E Tests / E2E — pnpm (push) Waiting to run
30 lines
840 B
Plaintext
30 lines
840 B
Plaintext
---
|
|
sidebar_position: 3
|
|
slug: /api/themes/@docusaurus/theme-live-codeblock
|
|
---
|
|
|
|
# 📦 theme-live-codeblock
|
|
|
|
This theme provides a `@theme/CodeBlock` component that is powered by [react-live](https://commerce.nearform.com/open-source/react-live/). You can read more on [interactive code editor](../../guides/markdown-features/markdown-features-code-blocks.mdx#interactive-code-editor) documentation.
|
|
|
|
```bash npm2yarn
|
|
npm install --save @docusaurus/theme-live-codeblock
|
|
```
|
|
|
|
### Configuration {#configuration}
|
|
|
|
```js title="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',
|
|
},
|
|
},
|
|
};
|
|
```
|