Switch to Kramdown, write a blog post
All checks were successful
/ deploy (push) Successful in 4m7s

This commit is contained in:
Aleks Rutins 2025-06-10 22:27:08 -04:00
parent 4b73564dac
commit a4f9dadd8b
Signed by: asr
SSH key fingerprint: SHA256:DBype7RrB3qCdOLdkvecD2Y3THOYgYOVw6jAHVgsGRQ
10 changed files with 58 additions and 17 deletions

View file

@ -5,7 +5,7 @@ class Pages::Post < ::Phlex::HTML
end
def view_template
meta = @post[:data].front_matter
render ::Pages::Layout.new({title: meta['title']}) {
render ::Pages::Layout.new({ as: :blog, title: meta['title'] }, banner: meta['banner'], meta: {title: meta['title']}) {
article(class: 'prose prose-lg m-auto') {
h1 { meta['title'] }
if meta['published_on']
@ -19,7 +19,7 @@ class Pages::Post < ::Phlex::HTML
hr
render ::Phlex::Markdown.new(@post[:data].content)
raw safe Kramdown::Document.new(@post[:data].content).to_html
}
}
end