mirror of
https://github.com/seigler/dash-docs
synced 2025-07-27 09:46:12 +00:00
Fix FTBFS in templates.rb when site.dest doesn't exist in older ruby versions
This commit is contained in:
parent
33dc7127bf
commit
dbb1823e69
1 changed files with 3 additions and 0 deletions
|
@ -53,6 +53,9 @@ module Jekyll
|
||||||
end
|
end
|
||||||
site.pages << TranslatePage.new(site, site.source, lang, '_templates', 'index.html', lang, 'index.html')
|
site.pages << TranslatePage.new(site, site.source, lang, '_templates', 'index.html', lang, 'index.html')
|
||||||
#Generate each redirection page based on _redirects.yml
|
#Generate each redirection page based on _redirects.yml
|
||||||
|
if !File.directory?(site.dest)
|
||||||
|
Dir.mkdir(site.dest)
|
||||||
|
end
|
||||||
redirects.each do |id,redirect|
|
redirects.each do |id,redirect|
|
||||||
next if redirect.has_key?('except') and redirect['except'].has_key?(lang)
|
next if redirect.has_key?('except') and redirect['except'].has_key?(lang)
|
||||||
src = locs[lang]['url'][id]
|
src = locs[lang]['url'][id]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue