Skip to content

Commit b5ae96b

Browse files
authored
fix: make frontmatter layout optional (#38)
Make the frontmatter layout optional, falling back to the configured layout
1 parent e2105c7 commit b5ae96b

File tree

1 file changed

+1
-1
lines changed
  • lib/tableau/extensions/post_extension/posts

1 file changed

+1
-1
lines changed

lib/tableau/extensions/post_extension/posts/post.ex

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ defmodule Tableau.PostExtension.Posts.Post do
99
attrs
1010
|> Map.put(:body, body)
1111
|> Map.put(:file, filename)
12-
|> Map.put(:layout, Module.concat([attrs.layout || post_config.layout]))
12+
|> Map.put(:layout, Module.concat([attrs[:layout] || post_config.layout]))
1313
|> Map.put_new_lazy(:title, fn ->
1414
with {:ok, document} <- Floki.parse_fragment(body),
1515
[hd | _] <- Floki.find(document, "h1") do

0 commit comments

Comments
 (0)