mirror of
https://0xacab.org/sutty/sutty
synced 2025-02-19 23:01:50 +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")
|
@full_path ||= File.join(site.path, "_#{locale}", "#{path}.markdown")
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# La colección
|
||||||
|
#
|
||||||
|
# @return [Jekyll::Collection]
|
||||||
|
def collection
|
||||||
|
site.collections[locale.to_s]
|
||||||
|
end
|
||||||
|
|
||||||
# Convertir locale a direccionario de PG
|
# Convertir locale a direccionario de PG
|
||||||
#
|
#
|
||||||
# @param [String,Symbol]
|
# @param [String,Symbol]
|
||||||
|
|
|
@ -218,17 +218,10 @@ class Site < ApplicationRecord
|
||||||
jekyll.data
|
jekyll.data
|
||||||
end
|
end
|
||||||
|
|
||||||
# Traer las colecciones. Todos los artículos van a estar dentro de
|
# Trae las colecciones desde el sitio, sin leer su contenido
|
||||||
# colecciones.
|
#
|
||||||
|
# @return [Hash]
|
||||||
def collections
|
def collections
|
||||||
unless @read
|
|
||||||
run_in_path do
|
|
||||||
jekyll.reader.read_collections
|
|
||||||
end
|
|
||||||
|
|
||||||
@read = true
|
|
||||||
end
|
|
||||||
|
|
||||||
jekyll.collections
|
jekyll.collections
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue