Initial commit

This commit is contained in:
2023-01-27 22:55:09 +11:00
commit 833f3ea8b2
130 changed files with 5637 additions and 0 deletions

17
app/views/pages/show.rb Normal file
View File

@@ -0,0 +1,17 @@
module Adamantium
module Views
module Pages
class Show < Adamantium::View
include Deps[renderer: "renderers.markdown"]
expose :page_content do |slug:|
markdown_content = File.read("app/content/pages/#{slug}.md")
renderer.call(content: markdown_content)
rescue Errno::ENOENT
renderer.call(content: "## Page not found")
end
end
end
end
end