It works!

This commit is contained in:
Aleks Rūtiņš 2024-12-25 15:17:50 -05:00
parent d9281ad53c
commit f42ff5da9b
14 changed files with 438 additions and 18 deletions

View file

@ -0,0 +1,20 @@
module BC
module Views
module Pages
class MarkdownPage < ::Phlex::HTML
def initialize(content, title, prev, fwd)
@content = content
@title = title
@prev = prev
@fwd = fwd
end
def view_template
render PageLayout.new(@title, @prev, @fwd) do
unsafe_raw Kramdown::Document.new(@content).to_html
end
end
end
end
end
end