lib/jekyll-toc.rb in jekyll-toc-0.7.0.alpha1 vs lib/jekyll-toc.rb in jekyll-toc-0.7.0.beta1
- old
+ new
@@ -1,5 +1,7 @@
+# frozen_string_literal: true
+
require 'nokogiri'
require 'table_of_contents/parser'
module Jekyll
class TocTag < Liquid::Tag
@@ -31,10 +33,10 @@
def toc_enabled?
@context.registers[:page]['toc'] == true
end
def toc_config
- @context.registers[:site].config["toc"] || {}
+ @context.registers[:site].config['toc'] || {}
end
end
end
Liquid::Template.register_filter(Jekyll::TableOfContentsFilter)