Sha256: 661289ece4ef9aac1767b45122a665e2585711ec0bc83a1db4cb8d406e01e5ad

Contents?: true

Size: 500 Bytes

Versions: 2

Compression:

Stored size: 500 Bytes

Contents

# Frozen-string-literal: true
# Encoding: utf-8

module Jekyll
  class LanguageDocument < Document
    include LanguageProperties

    alias_method :url_template_orig, :url_template
    alias_method :url_placeholders_orig, :url_placeholders

    def url_template
      return "/:language" + url_template_orig if !language.nil?
      url_template_orig
    end

    def url_placeholders
      url_placeholders_orig.merge!({
        language: language,
        subset: subset
      })
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
jekyll-language-plugin-1.3.1 lib/jekyll/language_document.rb
jekyll-language-plugin-1.3.0 lib/jekyll/language_document.rb