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:
parent
d601f37045
commit
b928fa7bde
2 changed files with 10 additions and 10 deletions
|
@ -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]
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue