From f28ba4095388ae965b129ac5b69c51d3c532ecca Mon Sep 17 00:00:00 2001 From: f Date: Fri, 20 Oct 2023 12:22:18 -0300 Subject: [PATCH] =?UTF-8?q?fix:=20leer=20el=20sitio=20completo=20durante?= =?UTF-8?q?=20la=20indexaci=C3=B3n?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/models/site/index.rb | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/app/models/site/index.rb b/app/models/site/index.rb index e11095e3..20914905 100644 --- a/app/models/site/index.rb +++ b/app/models/site/index.rb @@ -14,7 +14,14 @@ class Site def index_posts! Site.transaction do - docs.each(&:index!) + jekyll.read + jekyll.documents.each do |doc| + doc.read! + + Post.new(document: doc, site: self, layout: layouts[doc['layout'].to_sym).index! + end + + update(last_indexed_commit: repository.head_commit.oid) end end end