Module: Jekyll::Permalink

Defined in:
lib/jekyll-multiple-languages-plugin.rb

Overview


Include (with priority—prepend)the translated permanent link for Page and document


Instance Method Summary collapse

Instance Method Details

permalink



203
204
205
206
207
208
209
210
211
212
213
# File 'lib/jekyll-multiple-languages-plugin.rb', line 203

def permalink
  return nil if data.nil? || data['permalink'].nil?
  
  if site.config['relative_permalinks']
    File.join(@dir,  data['permalink'])
  else
    # Look if there's a permalink overwrite specified for this lang
    data['permalink_'+site.config['lang']] || data['permalink']
  end
  
end