Class: Jekyll::ArchiveDisplayTag
- Inherits:
-
Liquid::Tag
- Object
- Liquid::Tag
- Jekyll::ArchiveDisplayTag
- Defined in:
- lib/archive_display.rb
Overview
Executes a program and returns the output from STDOUT.
Instance Method Summary collapse
- #initialize(tag_name, archive_name, tokens) ⇒ void constructor
-
#render(context) ⇒ String
Method prescribed by the Jekyll plugin lifecycle.
Constructor Details
#initialize(tag_name, archive_name, tokens) ⇒ void
20 21 22 23 24 |
# File 'lib/archive_display.rb', line 20 def initialize(tag_name, archive_name, tokens) super(tag_name, archive_name, tokens) @logger = PluginMetaLogger.instance.new_logger(self, PluginMetaLogger.instance.config) @archive_name = archive_name.strip end |
Instance Method Details
#render(context) ⇒ String
Method prescribed by the Jekyll plugin lifecycle.
28 29 30 31 32 33 |
# File 'lib/archive_display.rb', line 28 def render(context) source = context.registers[:site].config["source"] tar_name = "#{source}/#{@archive_name}" @logger.debug "tar_name=#{tar_name}" traverse_tar(tar_name) end |