Class: Coradoc::Markdown::Sidebar
- Defined in:
- lib/coradoc/markdown/model/sidebar.rb
Overview
Sidebar block — a tangential aside, visually distinct from main flow.
Markdown has no native sidebar. Serialized as a VitePress ‘:::info` custom container. When the sidebar contains structured children (code blocks, lists, etc.), they are rendered into the container.
Instance Method Summary collapse
-
#initialize(content:, title: nil, children: [], **rest) ⇒ Sidebar
constructor
A new instance of Sidebar.
Methods inherited from Base
Constructor Details
#initialize(content:, title: nil, children: [], **rest) ⇒ Sidebar
Returns a new instance of Sidebar.
17 18 19 20 21 22 |
# File 'lib/coradoc/markdown/model/sidebar.rb', line 17 def initialize(content:, title: nil, children: [], **rest) super @content = content @title = title @children = Array(children) end |