Prevent untranslated urls to get in sitemap

This commit is contained in:
Saivann 2013-05-22 13:08:36 -04:00
parent b57e2d6680
commit 4fe01266f4
2 changed files with 3 additions and 3 deletions

View file

@ -28,11 +28,11 @@ module Jekyll
#Add translated pages with their alternative in each languages
locs['en']['url'].each do |id,value|
locs.each do |lang,value|
next if locs[lang]['url'][id].nil?
next if locs[lang]['url'][id].nil? or locs[lang]['url'][id] == ''
sitemap.puts '<url>'
sitemap.puts ' <loc>http://bitcoin.org/'+lang+'/'+locs[lang]['url'][id]+'</loc>'
locs.each do |altlang,value|
next if locs[altlang]['url'][id].nil? or altlang == lang
next if locs[altlang]['url'][id].nil? or locs[altlang]['url'][id] == '' or altlang == lang
sitemap.puts ' <xhtml:link'
sitemap.puts ' rel="alternate"'
sitemap.puts ' hreflang="'+altlang+'"'

View file

@ -470,7 +470,7 @@ fr:
bitcoin-for-enthusiasts: bitcoin-pour-passionnes
bitcoin-for-individuals: bitcoin-pour-particuliers
bitcoin-for-businesses: bitcoin-pour-entreprises
bitcoin-for-press: bitcoin-pour-presse
bitcoin-for-press:
choose-your-wallet: choisir-votre-porte-monnaie
community: communaute
development: developpement