mirror of
https://github.com/tabler/tabler.git
synced 2026-08-24 11:54:23 +04:00
css variables, capture fixes
This commit is contained in:
@@ -7,7 +7,7 @@ module Jekyll
|
||||
end
|
||||
|
||||
def render(context)
|
||||
if $captured_global[@text] === nil
|
||||
unless $captured_global[@text]
|
||||
$captured_global[@text] = [];
|
||||
end
|
||||
|
||||
@@ -54,10 +54,16 @@ module Jekyll
|
||||
end
|
||||
end
|
||||
|
||||
Jekyll::Hooks.register :site, :after_init do |page, jekyll|
|
||||
Jekyll::Hooks.register :pages, :post_init do |page|
|
||||
$captured_global = {}
|
||||
$captured_libs = []
|
||||
$captured_once = {}
|
||||
$captured_libs = []
|
||||
end
|
||||
|
||||
Jekyll::Hooks.register :pages, :post_render do |page|
|
||||
$captured_global = {}
|
||||
$captured_once = {}
|
||||
$captured_libs = []
|
||||
end
|
||||
|
||||
Jekyll::Hooks.register :pages, :pre_render do |page, jekyll|
|
||||
@@ -65,12 +71,6 @@ module Jekyll
|
||||
jekyll.site['captured_once'] = $captured_once
|
||||
jekyll.site['captured_libs'] = $captured_libs
|
||||
end
|
||||
|
||||
Jekyll::Hooks.register :pages, :post_render do |page, jekyll|
|
||||
$captured_global = {}
|
||||
$captured_libs = []
|
||||
$captured_once = {}
|
||||
end
|
||||
end
|
||||
|
||||
Liquid::Template.register_tag('capture_global', Jekyll::Tags::CaptureGlobal)
|
||||
|
||||
Reference in New Issue
Block a user