diff --git a/.scripts/merge-sitemaps.rb b/.scripts/merge-sitemaps.rb index 3b9240d1..45fe4a1c 100644 --- a/.scripts/merge-sitemaps.rb +++ b/.scripts/merge-sitemaps.rb @@ -1,5 +1,5 @@ # Merges sitemaps, to be called from the root directory -header, footer, content_main, content_2x, content_3x = [] +header, footer, content_main, content_2x, content_docs = [] File.open( "_site/sitemap.xml", 'r' ) do |f1| content_main = (IO.readlines f1) @@ -13,16 +13,14 @@ content_2x.slice!( -1 ) end -#File.open( "./tmp/site_3x/sitemap.xml", 'r' ) do |f3| -# content_3x = (IO.readlines f3) -# content_3x.slice!( 0..11 ) -# content_3x.slice!( -1 ) -#end - -# TODO: Add MkDocs sitemap +File.open( "./_site-docs/sitemap.xml", 'r' ) do |f3| + content_docs = (IO.readlines f3) + content_docs.slice!( 0..11 ) + content_docs.slice!( -1 ) +end File.open( "_site/sitemap.xml", 'w' ) do |f4| - f4.write ( header + content_main + content_2x + footer ).join() + f4.write ( header + content_main + content_docs + content_2x + footer ).join() end