Class: Jekyll::LanguagePage
Instance Method Summary
collapse
#language, #languages, #subset
Instance Method Details
#template ⇒ Object
11
12
13
14
|
# File 'lib/jekyll/language_page.rb', line 11
def template
return "/:language" + template_orig if !language.nil?
template_orig
end
|
#template_orig ⇒ Object
8
|
# File 'lib/jekyll/language_page.rb', line 8
alias_method :template_orig, :template
|
#url_placeholders ⇒ Object
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
# File 'lib/jekyll/language_page.rb', line 16
def url_placeholders
result = url_placeholders_orig.merge!({
language: language,
subset: subset
})
if !language.nil? && !subset.nil?
language_data = @site.languageData || LanguagePlugin::LanguageData.new(@site)
data = language_data.get(subset, language)
if !data.nil?
filtered = data.reject{ |k, v| v.is_a?(Enumerable) }
result.merge!(Hash[filtered.map{ |k, v| ["t.#{k}", v] }])
end
end
result
end
|
#url_placeholders_orig ⇒ Object
9
|
# File 'lib/jekyll/language_page.rb', line 9
alias_method :url_placeholders_orig, :url_placeholders
|