Class: Jekyll::Strapi::StrapiGenerator
- Inherits:
-
Generator
- Object
- Generator
- Jekyll::Strapi::StrapiGenerator
- Defined in:
- lib/jekyll/strapi/generator.rb
Overview
Generates pages for all collections with have the “generate” option set to True
Instance Method Summary collapse
Instance Method Details
#generate(site) ⇒ Object
7 8 9 10 11 12 13 14 15 |
# File 'lib/jekyll/strapi/generator.rb', line 7 def generate(site) site.strapi_collections.each do |collection_name, collection| if collection.generate? collection.each do |document| site.pages << StrapiPage.new(site, site.source, document, collection) end end end end |