Class: BridgetownNotion::Builder

Inherits:
Bridgetown::Builder
  • Object
show all
Defined in:
lib/bridgetown_notion/builder.rb

Instance Method Summary collapse

Instance Method Details

#buildObject



7
8
9
10
11
12
13
14
15
16
17
18
# File 'lib/bridgetown_notion/builder.rb', line 7

def build
  BridgetownNotion::NotionPostsFactory.create_posts(config.bridgetown_notion).each do |post|
    add_resource :posts, "#{post[:slug]}.md" do
      categories post[:categories]
      content post[:content]
      layout :post
      published post[:is_published]
      tags post[:tags]
      title post[:title]
    end
  end
end