5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2025-02-17 00:31:46 +00:00

BREAKING CHANGE: las colecciones no generan instancias de document

This commit is contained in:
f 2023-10-06 09:56:12 -03:00
parent d601f37045
commit b928fa7bde
No known key found for this signature in database
2 changed files with 10 additions and 10 deletions

View file

@ -43,6 +43,13 @@ class IndexedPost < ApplicationRecord
@full_path ||= File.join(site.path, "_#{locale}", "#{path}.markdown")
end
# La colección
#
# @return [Jekyll::Collection]
def collection
site.collections[locale.to_s]
end
# Convertir locale a direccionario de PG
#
# @param [String,Symbol]

View file

@ -218,17 +218,10 @@ class Site < ApplicationRecord
jekyll.data
end
# Traer las colecciones. Todos los artículos van a estar dentro de
# colecciones.
# Trae las colecciones desde el sitio, sin leer su contenido
#
# @return [Hash]
def collections
unless @read
run_in_path do
jekyll.reader.read_collections
end
@read = true
end
jekyll.collections
end