📦 theme-environment-variables
A Docusaurus theme that parameterizes code blocks.
Try It Out
In the right-docked Toolbar, open the "Environment Variables" tab to personalize these snippets!
Common Use Cases
Use this when you have helpful code block but want to allow developers to personalize those snippets. Common examples include domain-specific tasks such as restoring a database backup and repetitive tasks such as installing a package.
Installation
This theme is only available through the preset
@docupotamus/docusaurus-preset-classic
because it requires a Workbench
integration. Installing as a standalone dependency is not supported.
See here for instructions on
installing the preset-classic
.
Example Usage
In the right-docked Toolbar, open the "Environment Variables" tab to personalize these snippets!
Copying through the code block copy button is not yet supported. Please use the Workbench integration copy button. This is a known limitation.
Customizing
Styling
Styling through theme class names is an advanced approach.
It's appropriate when you need complete control over fine-grained details such as spacing.
We provide some stable CSS class names for robust and maintainable global layout styling. These names are theme-agnostic and meant to be targeted by custom CSS.
.DocupotamusEnvironmentVariable
Example Styling
Open your DevTools Console panel with Command+Option+J and try it out!
What's Next?
The roadmap includes some important feature requests such as integrating with the code block copy button and page-scoped (as opposed to block-scoped) environment variables.
If you have comments, questions, or are looking to contribute, please start a conversation over a GitHub issue!
Please remember to ⭐ give us a star on GitHub! ⭐