Display title and subtitle

Also wrap the content in an article for semantic formatting

tufte.css requires that content is wrapped in an <article> and at least
one <section>. There's no way of determining new semantic sections so
there is only one.
This commit is contained in:
Edward Loveall 2021-08-15 15:01:18 -04:00
parent 05c18f6451
commit 6baba80309
No known key found for this signature in database
GPG Key ID: 789A4AE983AC8901
1 changed files with 9 additions and 1 deletions

View File

@ -2,6 +2,14 @@ class Articles::ShowPage < MainLayout
needs page : Page
def content
mount PageContent, page: page
h1 page.title
if subtitle = page.subtitle
para subtitle, class: "subtitle"
end
article do
section do
mount PageContent, page: page
end
end
end
end