Class: Jekyll::DefaultFullSearch

Inherits:
Liquid::Tag
  • Object
show all
Defined in:
lib/jekyll/FDroidSearchAutocompleteTag.rb

Overview

For each search result, this will render the contents of “_includes/search-full-default-result-template.html” from this plugin.

Instance Method Summary collapse

Constructor Details

#initialize(tag_name, argument, tokens) ⇒ DefaultFullSearch

Returns a new instance of DefaultFullSearch.



79
80
81
82
# File 'lib/jekyll/FDroidSearchAutocompleteTag.rb', line 79

def initialize(tag_name, argument, tokens)
  super
  @empty_search_id = argument.strip
end

Instance Method Details

#render(context) ⇒ Object



84
85
86
87
88
89
90
91
92
# File 'lib/jekyll/FDroidSearchAutocompleteTag.rb', line 84

def render(context)
  search_form_template_path = "../../_layouts/search-full.html"

  result_item_template_path = "../../_includes/search-full-default-result-template.html"
  result_item_template = IO.read((File.expand_path(result_item_template_path, File.dirname(__FILE__))))

  context['empty_search_id'] = @empty_search_id
  SearchForm.render_form(context, search_form_template_path, result_item_template)
end