Add updated_at to pages
This commit is contained in:
@@ -5,4 +5,6 @@ article class="mb-12 prose dark:prose-invert max-w-prose mx-auto text-gray-800 d
|
||||
h1= page_name
|
||||
== page_content
|
||||
|
||||
- if page_updated_at
|
||||
="Last updated: #{page_updated_at}"
|
||||
div class="max-w-screen-md mx-auto border-t border-solid border-gray-200 dark:border-gray-600"
|
||||
|
@@ -12,6 +12,10 @@ module Main
|
||||
page.name
|
||||
end
|
||||
|
||||
expose :page_updated_at do |page|
|
||||
page.updated_at&.strftime("%m/%d/%Y")
|
||||
end
|
||||
|
||||
private_expose :page do |slug:|
|
||||
page_repo.fetch!(slug: slug)
|
||||
end
|
||||
|
Reference in New Issue
Block a user