Class: JekyllNotion::NotionPage

Inherits:
AbstractNotionResource show all
Defined in:
lib/jekyll-notion/notion_page.rb

Instance Method Summary collapse

Methods inherited from AbstractNotionResource

#config, #id, #initialize

Constructor Details

This class inherits a constructor from JekyllNotion::AbstractNotionResource

Instance Method Details

#collection_nameObject



17
18
19
# File 'lib/jekyll-notion/notion_page.rb', line 17

def collection_name
  nil
end

#data_nameObject



13
14
15
# File 'lib/jekyll-notion/notion_page.rb', line 13

def data_name
  config["data"]
end

#fetchObject

Returns the nil or a NotionToMd::Page instance



6
7
8
9
10
11
# File 'lib/jekyll-notion/notion_page.rb', line 6

def fetch
  return nil unless id?

  @fetch ||= NotionToMd::Page.new(:page   => @notion.page({ :page_id => id }),
                                  :blocks => build_blocks(id))
end