Class: Rop::SiteTypeVariableGenerator

Inherits:
Jekyll::Generator
  • Object
show all
Defined in:
lib/rop/site_type.rb

Overview

Infers from available content whether the site is a hub or individual project site, and adds site-wide config variable accessible as site.is_hub } in Liquid.

Instance Method Summary collapse

Instance Method Details

#generate(site) ⇒ Object



10
11
12
# File 'lib/rop/site_type.rb', line 10

def generate(site)
  site.config['is_hub'] = hub_site?(site)
end