22 lines
434 B
Ruby
22 lines
434 B
Ruby
module Main
|
|
module Views
|
|
module Pages
|
|
class Show < Main::View
|
|
include Deps["repos.page_repo", renderer: "renderers.markdown"]
|
|
|
|
expose :page_content do |page|
|
|
renderer.call(content: page.content)
|
|
end
|
|
|
|
expose :page_name do |page|
|
|
page.name
|
|
end
|
|
|
|
private_expose :page do |slug:|
|
|
page_repo.fetch!(slug: slug)
|
|
end
|
|
end
|
|
end
|
|
end
|
|
end
|