Class: JekyllNotion::Generator
- Inherits:
-
Jekyll::Generator
- Object
- Jekyll::Generator
- JekyllNotion::Generator
- Defined in:
- lib/jekyll-notion/generator.rb
Instance Attribute Summary collapse
-
#current_db ⇒ Object
readonly
Returns the value of attribute current_db.
-
#current_page ⇒ Object
readonly
Returns the value of attribute current_page.
Instance Method Summary collapse
Instance Attribute Details
#current_db ⇒ Object (readonly)
Returns the value of attribute current_db.
5 6 7 |
# File 'lib/jekyll-notion/generator.rb', line 5 def current_db @current_db end |
#current_page ⇒ Object (readonly)
Returns the value of attribute current_page.
5 6 7 |
# File 'lib/jekyll-notion/generator.rb', line 5 def current_page @current_page end |
Instance Method Details
#generate(site) ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/jekyll-notion/generator.rb', line 7 def generate(site) @site = site return unless notion_token? && config? if fetch_on_watch? || collections.empty? read_notion_database else collections.each_pair { |key, val| @site.collections[key] = val } end end |