mirror of
https://github.com/seigler/dash-docs
synced 2025-07-27 01:36:13 +00:00
Normalize page redirections
Use a fallback HTML page with a manual and javascript redirect Keep canonical pages only for alerts
This commit is contained in:
parent
b988ce349c
commit
3da682b36b
11 changed files with 69 additions and 54 deletions
|
@ -71,7 +71,7 @@ module Jekyll
|
|||
next if !/\.html$/.match(file2)
|
||||
#Ignore static redirect pages
|
||||
data = File.read(file1+'/'+file2)
|
||||
next if !data.index('window.location.href=').nil?
|
||||
next if !data.index('window.location.href=').nil? or !data.index('redirect:').nil?
|
||||
sitemap.puts '<url>'
|
||||
sitemap.puts ' <loc>http://bitcoin.org/'+file1+'/'+file2.gsub('.html','')+'</loc>'
|
||||
sitemap.puts '</url>'
|
||||
|
@ -81,7 +81,7 @@ module Jekyll
|
|||
next if file1 == 'index.html'
|
||||
#Ignore static redirect pages and google webmaster tools
|
||||
data = File.read(file1)
|
||||
next if !data.index('window.location.href=').nil? or !data.index('google-site-verification:').nil?
|
||||
next if !data.index('window.location.href=').nil? or !data.index('redirect:').nil? or !data.index('google-site-verification:').nil?
|
||||
sitemap.puts '<url>'
|
||||
sitemap.puts ' <loc>http://bitcoin.org/'+file1.gsub('.html','')+'</loc>'
|
||||
sitemap.puts '</url>'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue