Class: Jekyll::Latex::Pdf::Generator

Inherits:
Generator
  • Object
show all
Defined in:
lib/jekyll/latex/pdf/generator.rb

Overview

The generator acutally generates pdf files for posts with ‘pdf: true` in the yaml header.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#configObject (readonly)

Returns the value of attribute config.



14
15
16
# File 'lib/jekyll/latex/pdf/generator.rb', line 14

def config
  @config
end

Instance Method Details

#generate(site) ⇒ Object



16
17
18
19
20
21
22
23
24
25
# File 'lib/jekyll/latex/pdf/generator.rb', line 16

def generate(site)
  @site, @config = site, Defaults.defaults.merge(site.config["pdf"] || {})

  @site.config["pdf"].merge! @config
  @site.config["exclude"] << @site.config["pdf"]["latex_cache_path"].to_s + File::SEPARATOR

  @site.posts.docs.each do |post|
    @site.pages << Document.new(@site, post) if post.data["pdf"]
  end
end