Sha256: 11317977d29ebb9abf7794fa32267968ecdb33ff2a93bbf4d3f5e0043ed22108
Contents?: true
Size: 804 Bytes
Versions: 2
Compression:
Stored size: 804 Bytes
Contents
module Octopress module Paginate class PaginationPage < Jekyll::Page def initialize(site, base, index, template) @site = site @base = base @dir = File.join(template.dir, template.data['paginate']['permalink'].clone.sub(':num', index.to_s)) @name = 'index.html' process(name) read_yaml(File.join(base, File.dirname(template.path)), File.basename(template.path)) self.data.delete('permalink') self.data.merge!({ 'paginate' => template.data['paginate'].clone }) self.data['paginate']['page_num'] = index self.data['title'] ||= self.data['paginate']['collection'].capitlaize self.data['title'] << data['paginate']['title_suffix'].sub(/:num/, data['paginate']['page_num'].to_s) end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
octopress-paginate-1.1.0 | lib/octopress-paginate/page.rb |
octopress-paginate-1.0.0 | lib/octopress-paginate/page.rb |