diff --git a/config/initializers/core_extensions.rb b/config/initializers/core_extensions.rb index 95cf9571..66003a00 100644 --- a/config/initializers/core_extensions.rb +++ b/config/initializers/core_extensions.rb @@ -1,6 +1,30 @@ # frozen_string_literal: true -require 'jekyll/document' - String.include CoreExtensions::String::StripTags Jekyll::Document.include CoreExtensions::Jekyll::Document::Path + +# Lazy Loading de Jekyll, deshabilitando la instanciación de elementos +# que no necesitamos +# +# TODO: Aplicar monkey patches en otro lado... +module Jekyll + Site.class_eval do + def setup + ensure_not_in_dest + end + end + + Reader.class_eval do + def retrieve_posts(_); end + + def retrieve_dirs(_, _, _); end + + def retrieve_pages(_, _); end + + def retrieve_static_files(_, _); end + end + + ThemeAssetsReader.class_eval do + def read; end + end +end