Extensions & Integrations
This page explores various Asciidoctor extensions and third-party integrations. Some work seamlessly with the dark theme, others may need additional styling. Toggle between light and dark modes to see how each renders.
- JavaScript
-
const greeting = "Hello, dark mode!"; console.log(greeting); - Python
-
greeting = "Hello, dark mode!" print(greeting) - Ruby
-
greeting = "Hello, dark mode!" puts greeting
When latexmath is enabled, you can write inline math like \(\sqrt{x^2 + y^2}\) or display equations:
Math rendering depends on your playbook’s STEM configuration.
If formulas don’t appear, ensure asciidoc.attributes.stem is set.
|
Here’s a Mermaid flowchart (requires Kroki or native Mermaid integration):
graph LR
A[Start] --> B{Decision}
B -->|Yes| C[Action 1]
B -->|No| D[Action 2]
C --> E[End]
D --> E
| Diagram colors are defined in the diagram source, not CSS. For dark mode compatibility, use neutral colors or theme-aware palettes in your diagram definitions. |
@startuml
Alice -> Bob: Authentication Request
Bob --> Alice: Authentication Response
Alice -> Bob: Another request
Bob --> Alice: Another response
@enduml
PlantUML supports skinparam for theming.
Use skinparam backgroundColor transparent and dark-friendly colors for better results.
|
Embedded Content
Iframes and embedded widgets maintain their own styling—they don’t inherit from the parent page’s CSS.
This has hardcoded colors—it looks the same in both themes.
Interactive Elements
Press Ctrl+Shift+P to open the command palette.
Use Cmd+K then Cmd+S to save all files.
Common shortcuts: Esc, Enter, Tab, Space
Select to export.
Click OK to confirm or Cancel to abort.
Navigate to .
Font Icons
Love this theme
Write some code
Light mode / Dark mode
Check out the repo
Warnings stand out
Custom Roles & Styling
Lead paragraphs introduce sections with emphasis.
Small text for footnotes or asides.
Big text for impact.
Underlined for emphasis.
Struck through for deletions.
What Needs Extra Work?
Some extensions require additional dark mode CSS:
| Extension | Status | Notes |
|---|---|---|
Tabs ( |
Works |
Inherits theme colors |
STEM / Math |
Works |
SVG/HTML inherits text color |
Kroki / Diagrams |
Partial |
Diagram colors are hardcoded in source |
Video embeds |
Works |
Player has own chrome |
HTML Passthrough |
Manual |
Inline styles override theme |
Keyboard macros |
Works |
Styled by theme |
Menu/Button macros |
Works |
Styled by theme |
Font icons |
Works |
Inherits text color |
Custom roles |
Partial |
Standard roles styled; custom need CSS |
Extending for Your Content
To style custom elements in dark mode, add selectors to your CSS:
/* Your custom component */
html.dark-theme .my-custom-widget {
background-color: #25262b;
color: #c1c2c5;
border-color: #373a40;
}
/* Dark-mode-aware diagram wrapper */
html.dark-theme .diagram-wrapper svg {
filter: invert(0.85) hue-rotate(180deg);
}
The filter: invert() hue-rotate() trick can make light-themed diagrams readable in dark mode, though colors will shift.
|