Class: ImageGallery::GalleryPage
- Inherits:
- 
      Jekyll::Page
      
        - Object
- Jekyll::Page
- ImageGallery::GalleryPage
 
- Defined in:
- lib/gallery/gallery.rb
Instance Method Summary collapse
- 
  
    
      #initialize(site, gallery)  ⇒ GalleryPage 
    
    
  
  
  
    constructor
  
  
  
  
  
  
  
    A new instance of GalleryPage. 
Constructor Details
#initialize(site, gallery) ⇒ GalleryPage
Returns a new instance of GalleryPage.
| 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 | # File 'lib/gallery/gallery.rb', line 217 def initialize(site, gallery) @site = site @base = site.source year = gallery.datetime.year month = gallery.datetime.month @dir = File.join(*ImageGallery.gallery_path_array(site, year, month)) @basename = gallery.id @ext = '.html' @name = "#{@basename}#{@ext}" config = ImageGallery._config_with_defaults(site) @data = { 'layout' => 'gallery_page', 'gallery' => gallery, 'year' => year, 'title' => [config['title_prefix'], year, gallery.name].join(" #{config['title_seperator']} "), } data.default_proc = proc do |_, key| site.frontmatter_defaults.find(relative_path, :galleries, key) end end |