Module: AlFolioDistill

Defined in:
lib/al_folio_distill.rb,
lib/al_folio_distill/version.rb

Defined Under Namespace

Classes: AssetsGenerator, PluginStaticFile, RenderTag

Constant Summary collapse

PLUGIN_ROOT =
File.expand_path("..", __dir__)
TEMPLATES_ROOT =
File.join(PLUGIN_ROOT, "templates")
ASSETS_ROOT =
File.join(PLUGIN_ROOT, "assets")
DISTILL_REMOTE_LOADER_PATTERN =
%r{https://distill\.pub/template\.v2\.js}
VERSION =
"1.0.2"

Class Method Summary collapse

Class Method Details

.enabled?(site) ⇒ Boolean

Returns:

  • (Boolean)


16
17
18
# File 'lib/al_folio_distill.rb', line 16

def enabled?(site)
  site.config.dig("al_folio", "features", "distill", "enabled") != false
end

.remote_loader_allowed?(site) ⇒ Boolean

Returns:

  • (Boolean)


20
21
22
# File 'lib/al_folio_distill.rb', line 20

def remote_loader_allowed?(site)
  site.config.dig("al_folio", "distill", "allow_remote_loader") == true
end