mirror of
https://github.com/seigler/dash-docs
synced 2025-07-27 09:46:12 +00:00
Prevent untranslated urls to get in sitemap
This commit is contained in:
parent
b57e2d6680
commit
4fe01266f4
2 changed files with 3 additions and 3 deletions
|
@ -28,11 +28,11 @@ module Jekyll
|
||||||
#Add translated pages with their alternative in each languages
|
#Add translated pages with their alternative in each languages
|
||||||
locs['en']['url'].each do |id,value|
|
locs['en']['url'].each do |id,value|
|
||||||
locs.each do |lang,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 '<url>'
|
||||||
sitemap.puts ' <loc>http://bitcoin.org/'+lang+'/'+locs[lang]['url'][id]+'</loc>'
|
sitemap.puts ' <loc>http://bitcoin.org/'+lang+'/'+locs[lang]['url'][id]+'</loc>'
|
||||||
locs.each do |altlang,value|
|
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 ' <xhtml:link'
|
||||||
sitemap.puts ' rel="alternate"'
|
sitemap.puts ' rel="alternate"'
|
||||||
sitemap.puts ' hreflang="'+altlang+'"'
|
sitemap.puts ' hreflang="'+altlang+'"'
|
||||||
|
|
|
@ -470,7 +470,7 @@ fr:
|
||||||
bitcoin-for-enthusiasts: bitcoin-pour-passionnes
|
bitcoin-for-enthusiasts: bitcoin-pour-passionnes
|
||||||
bitcoin-for-individuals: bitcoin-pour-particuliers
|
bitcoin-for-individuals: bitcoin-pour-particuliers
|
||||||
bitcoin-for-businesses: bitcoin-pour-entreprises
|
bitcoin-for-businesses: bitcoin-pour-entreprises
|
||||||
bitcoin-for-press: bitcoin-pour-presse
|
bitcoin-for-press:
|
||||||
choose-your-wallet: choisir-votre-porte-monnaie
|
choose-your-wallet: choisir-votre-porte-monnaie
|
||||||
community: communaute
|
community: communaute
|
||||||
development: developpement
|
development: developpement
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue