Skip to content

Commit 09e3223

Browse files
committed
Add YAML frontmatter to markdown views with title, author, and URL metadata
1 parent 672b188 commit 09e3223

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

app/views/books/show.md.erb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,7 @@
1+
---
2+
title: "<%= @book.title %>"
3+
author: "<%= @book.author %>"
4+
url: "<%= book_slug_url(@book) %>"
5+
---
6+
17
<%= raw @book.markable %>

app/views/leafables/show.md.erb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,6 @@
1+
---
2+
title: "<%= @leaf.title %>"
3+
url: "<%= leafable_slug_url(@leaf) %>"
4+
---
5+
16
<%= raw @leaf.leafable.markable %>

0 commit comments

Comments
 (0)