Sha256: dfc5505510f5d160dee259c7aa7024e29a28bc8cf5e2c16b19ed0ca2ca12da39
Contents?: true
Size: 892 Bytes
Versions: 6
Compression:
Stored size: 892 Bytes
Contents
# Frozen-string-literal: true # Copyright: 2012 - 2018 - MIT License # Encoding: utf-8 require "pathutil" require "jekyll" # -- # rubocop:disable Layout/BlockEndNewline # rubocop:disable Layout/MultilineBlockLayout # rubocop:disable Style/BlockDelimiters # -- def require_all(*globs) path = Pathutil.new("assets").expand_path(__dir__) globs.each { |v| path.glob(v).reject(&:directory?).each do |vv| require vv end } end # -- require_relative "assets/env" Jekyll::Hooks.register :site, :post_read, priority: 99 do |o| unless o.sprockets Jekyll::Assets::Env.new(o) end end # -- # Post render hook. # We need to run really early because we want to have our # stuff block and be done just incase something else relies # on our stuff to do their stuff. Such as reloaders. # -- Jekyll::Hooks.register :site, :post_write, priority: 99 do |o| o&.sprockets&.write_all end
Version data entries
6 entries across 6 versions & 1 rubygems