mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-26 11:36:23 +00:00
feat: poder pasar el layout como símbolo
This commit is contained in:
parent
b0c21f989e
commit
e1d80e4853
2 changed files with 3 additions and 1 deletions
|
@ -57,6 +57,8 @@ class Post
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
args[:layout] = args[:site].layouts[args[:layout]] if args[:layout].is_a? Symbol
|
||||||
|
|
||||||
Post.new(**args)
|
Post.new(**args)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -20,7 +20,7 @@ class Site
|
||||||
jekyll.documents.each do |doc|
|
jekyll.documents.each do |doc|
|
||||||
doc.read!
|
doc.read!
|
||||||
|
|
||||||
Post.new(document: doc, site: self, layout: layouts[doc['layout'].to_sym]).index!
|
Post.new(document: doc, site: self, layout: doc['layout'].to_sym).index!
|
||||||
end
|
end
|
||||||
|
|
||||||
update(last_indexed_commit: repository.head_commit.oid)
|
update(last_indexed_commit: repository.head_commit.oid)
|
||||||
|
|
Loading…
Reference in a new issue