From e6a589a9b1e1028d1f427658a10c01bbc0cde958 Mon Sep 17 00:00:00 2001 From: f Date: Mon, 28 Sep 2020 19:28:57 -0300 Subject: [PATCH] arreglitos --- app/models/site.rb | 8 ++++++-- db/seeds/designs.yml | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/app/models/site.rb b/app/models/site.rb index bd382131..3da9b219 100644 --- a/app/models/site.rb +++ b/app/models/site.rb @@ -467,13 +467,17 @@ class Site < ApplicationRecord new_site = Jekyll::Site.new(new_configuration) new_site.read + + # No vale la pena seguir procesando si no hay artículos! + return if new_site.documents.empty? + new_site.documents.map(&:read!) - new_layouts = new_site.layouts.keys + old_layouts = new_site.documents.map do |doc| doc.data['layout'] end.uniq.compact - @incompatible_layouts = old_layouts - new_layouts + @incompatible_layouts = old_layouts - new_site.layouts.keys return if @incompatible_layouts.empty? diff --git a/db/seeds/designs.yml b/db/seeds/designs.yml index b9966a9f..e9386299 100644 --- a/db/seeds/designs.yml +++ b/db/seeds/designs.yml @@ -64,7 +64,7 @@ description_en: "A theme with streaming support, designed for community radios" description_es: 'Con soporte para transmisión en vivo, pensada para radios comunitarias' license: 'https://0xacab.org/sutty/jekyll/radios-comunitarias-jekyll-theme/-/blob/master/LICENSE.txt' - credits_es: 'Desarrollamos esta plantilla junto con Librenauta en una jornada de 15 horas :)' + credits_es: 'Desarrollamos esta plantilla junto con Librenauta en 15 horas :)' credits_en: 'We made this template with Librenauta in 15 hours :)' designer_url: 'https://copiona.com/donaunbit/' - name_en: 'Resource toolkit'