Class: Coradoc::Markdown::Sidebar

Inherits:
Base
  • Object
show all
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

Methods inherited from Base

visit, #visit

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