A Docusaurus plugin that adds fullscreen functionality to code blocks, allowing users to view code in an immersive, distraction-free fullscreen mode.
Install the plugin using your preferred package manager:
npm install docusaurus-plugin-fullscreenyarn add docusaurus-plugin-fullscreenpnpm add docusaurus-plugin-fullscreenAdd the plugin to your docusaurus.config.js:
module.exports = {
// ... other config
plugins: [
'docusaurus-plugin-fullscreen',
],
// ... rest of your config
};The plugin can be configured with custom options:
module.exports = {
// ... other config
plugins: [
[
'docusaurus-plugin-fullscreen',
{
// Custom configuration options
fullscreenButtonTooltip: 'Toggle fullscreen mode',
enableEscapeKey: true,
exitOnBrowserBack: true,
addToUntitledBlocks: true,
fullscreenZoomLevel: 120,
animationDuration: 200,
},
],
],
// ... rest of your config
};- Node.js 18.0 or higher
- Docusaurus 3.0 or higher
- React 18.0 or higher
For comprehensive documentation and examples, visit the plugin documentation.
Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.
Licensed under the MIT License, Copyright © frostybee.
See LICENSE for more information.