repubmark/examples/full.repub

83 lines
1.7 KiB
Text

article.annotation do |annotation|
annotation.paragraph do |paragraph|
paragraph.text 'Annotation paragraph text'
end
end
article.blockquote do |blockquote|
blockquote.paragraph do |paragraph|
paragraph.text 'Blockquote paragraph text'
end
blockquote.caption do |caption|
caption.text 'Blockquote caption text'
end
end
article.code_block :ruby, <<~CODE
[[:foo, 1], [:bar, 2], [:car, 3]].each do |str, num|
puts str
puts num**2
end
CODE
article.iframe 'Example.com', 'https://example.com'
article.nice_figure 'foo.jpg', 'The Foo'
article.nice_figures do |figures|
figures.figure 'qwe.jpg', 'The Qwe'
figures.figure 'rty.jpg', 'The Rty'
end
article.chapter '1', 'Chapter 1' do |chapter|
chapter.paragraph do |paragraph|
paragraph.text 'Chapter 1 paragraph text'
end
end
article.chapter '2', 'Chapter 2' do |chapter|
chapter.paragraph do |paragraph|
paragraph.text 'Chapter 2 paragraph text'
end
end
article.footnotes_category 'Related articles' do |category|
category.footnote(
category: :self,
slug: 'foo-bar',
index: 1,
url: './foo-bar',
link_text: 'Foo Bar',
date: '2024-09-12',
) do |footnote|
footnote.mdash
footnote.text 'Baz Car Cdr Qwe Rty'
end
end
article.footnotes_category 'Links' do |category|
category.footnote(
category: :link,
slug: 'example-com',
index: 2,
url: 'https://example.com',
link_text: 'Example Domain',
alt_urls: [
{
name: 'web.archive.org',
url: 'https://web.archive.org/arch/example.com',
},
],
) do |footnote|
footnote.mdash
footnote.text 'This domain is for use in illustrative examples in documents'
end
end