5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-07-02 16:26:07 +00:00

fix: cargar jekyll cuando realmente se lo usa

This commit is contained in:
f 2022-12-30 10:56:00 -03:00
parent d896a111b8
commit f35f4c0f06

View file

@ -54,10 +54,6 @@ class Site < ApplicationRecord
before_create :clone_skel!
# Elimina el directorio al destruir un sitio
before_destroy :remove_directories!
# Carga el sitio Jekyll una vez que se inicializa el modelo o después
# de crearlo
after_initialize :install_gems, :load_jekyll
after_create :install_gems, :load_jekyll
# Cambiar el nombre del directorio
before_update :update_name!
before_save :add_private_key_if_missing!
@ -338,12 +334,14 @@ class Site < ApplicationRecord
end
def jekyll
run_in_path do
@jekyll ||=
@jekyll ||=
begin
install_gems
Jekyll::Site.new(configuration).tap do |site|
site.reader = JekyllData::Reader.new(site) if site.theme
end
end
end
end
# Cargar el sitio Jekyll