Skip to content

Commit

Permalink
Include documentation sitemap into the bundle
Browse files Browse the repository at this point in the history
  • Loading branch information
oleg-nenashev committed Dec 10, 2023
1 parent e4a36da commit 11bcd69
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions .scripts/merge-sitemaps.rb
Original file line number Diff line number Diff line change
@@ -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)
Expand All @@ -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


Expand Down

0 comments on commit 11bcd69

Please sign in to comment.