Class: Jekyll::Renderer

Inherits:
Object
  • Object
show all
Defined in:
lib/jekyll/renderer.rb

Overview

Renders a Document

See Also:

  • jekyll-4jekyll-4.0jekyll-4.0.0/lib/jekyll/rendererjekyll-4.0.0/lib/jekyll/renderer.rb

Instance Method Summary collapse

Instance Method Details

#place_in_layouts(content, payload, info) ⇒ Object

Encrypts the content before it’s placed into the layout tree



15
16
17
18
19
20
21
22
# File 'lib/jekyll/renderer.rb', line 15

def place_in_layouts(content, payload, info)
  if encrypt?
    crypto = Crypto.new(site: site, post: document)
    crypto.encrypt! && crypto.valid?
  end

  place_in_layouts_orig document.content, payload, info
end

#place_in_layouts_origObject

We redefine this method because it’s the last place where we see the Document content before it’s placed inside the layouts. We could use a post render hook but it’s too late to make modifications to the content.



12
# File 'lib/jekyll/renderer.rb', line 12

alias place_in_layouts_orig place_in_layouts