mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-26 02:06:21 +00:00
36 lines
732 B
Ruby
36 lines
732 B
Ruby
# frozen_string_literal: true
|
|
|
|
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
|
|
|
|
# Prevenir la lectura del documento
|
|
Document.class_eval do
|
|
alias_method :read!, :read
|
|
def read; end
|
|
end
|
|
end
|