It works!
This commit is contained in:
parent
d9281ad53c
commit
f42ff5da9b
14 changed files with 438 additions and 18 deletions
20
views/pages/markdown_page.rb
Normal file
20
views/pages/markdown_page.rb
Normal 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
|
Loading…
Add table
Add a link
Reference in a new issue