5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-11-26 09:16:22 +00:00

feat: poder pasar el layout como símbolo

This commit is contained in:
f 2023-10-26 18:08:44 -03:00
parent b0c21f989e
commit e1d80e4853
No known key found for this signature in database
2 changed files with 3 additions and 1 deletions

View file

@ -57,6 +57,8 @@ class Post
end
end
args[:layout] = args[:site].layouts[args[:layout]] if args[:layout].is_a? Symbol
Post.new(**args)
end
end

View file

@ -20,7 +20,7 @@ class Site
jekyll.documents.each do |doc|
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
update(last_indexed_commit: repository.head_commit.oid)