From ae745b3d46b830b55f0d60b7bba4755b9541a682 Mon Sep 17 00:00:00 2001 From: f Date: Fri, 6 Oct 2023 09:57:21 -0300 Subject: [PATCH] feat: obtener el document a partir del post indexado --- app/models/indexed_post.rb | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/app/models/indexed_post.rb b/app/models/indexed_post.rb index e59e1a2f..5c4b151e 100644 --- a/app/models/indexed_post.rb +++ b/app/models/indexed_post.rb @@ -50,6 +50,13 @@ class IndexedPost < ApplicationRecord site.collections[locale.to_s] end + # Obtiene el documento + # + # @return [Jekyll::Document] + def document + @document ||= Jekyll::Document.new(full_path, site: site.jekyll, collection: collection) + end + # Convertir locale a direccionario de PG # # @param [String,Symbol]