repubmark/examples/full.repub

84 lines
1.7 KiB
Text
Raw Normal View History

2024-02-24 23:54:16 -05:00
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 'Chapter 1' do |chapter|
chapter.paragraph do |paragraph|
paragraph.text 'Chapter 1 paragraph text'
end
end
article.chapter 'Chapter 2' do |chapter|
chapter.paragraph do |paragraph|
paragraph.text 'Chapter 2 paragraph text'
end
end
2024-09-11 20:34:48 -04:00
article.footnotes_category 'Related articles' do |category|
category.footnote(
category: :self,
slug: 'foo-bar',
index: 1,
url: './foo-bar',
2024-09-17 01:48:48 -04:00
link_text: 'Foo Bar',
2024-09-11 20:34:48 -04:00
date: '2024-09-12',
2024-09-17 01:48:48 -04:00
) do |footnote|
footnote.mdash
footnote.text 'Baz Car Cdr Qwe Rty'
end
2024-09-11 20:34:48 -04:00
end
article.footnotes_category 'Links' do |category|
category.footnote(
category: :link,
slug: 'example-com',
index: 2,
url: 'https://example.com',
2024-09-17 01:48:48 -04:00
link_text: 'Example Domain',
2024-09-11 20:34:48 -04:00
alt_urls: [
{
name: 'web.archive.org',
url: 'https://web.archive.org/arch/example.com',
},
],
2024-09-17 01:48:48 -04:00
) do |footnote|
footnote.mdash
footnote.text 'This domain is for use in illustrative examples in documents'
end
2024-09-11 20:34:48 -04:00
end