본문으둜 κ±΄λ„ˆλ›°κΈ°
버전: 2.3.1

πŸ“¦ theme-live-codeblock

react-live 기반 @theme/CodeBlock μ»΄ν¬λ„ŒνŠΈλ₯Ό μ§€μ›ν•˜λŠ” ν…Œλ§ˆμž…λ‹ˆλ‹€. μžμ„Έν•œ λ‚΄μš©μ€ μΈν„°λž™ν‹°λΈŒ μ½”λ“œ 에디터 λ¬Έμ„œμ—μ„œ μ°Έκ³ ν•˜μ‹€ 수 μžˆμŠ΅λ‹ˆλ‹€.

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

섀정​

docusaurus.config.js
module.exports = {
plugins: ['@docusaurus/theme-live-codeblock'],
themeConfig: {
liveCodeBlock: {
/**
* live playground μœ„μΉ˜λ₯Ό μ—λ””ν„°μ˜ μœ„ λ˜λŠ” μ•„λž˜λ‘œ μ„€μ •ν•©λ‹ˆλ‹€.
* μ„€μ •ν•  수 μžˆλŠ” κ°’: "top" | "bottom"
*/
playgroundPosition: 'bottom',
},
},
};