36c90af395efb0985f7f840005cb1ff9640d9d16
lrnassar
  Mon Jan 20 09:19:13 2025 -0800
Additional tweaks to the new docs page, more details in the ticket. Refs #30335

diff --git docs/staticPage.lua docs/staticPage.lua
index f236cb7..11003e4 100644
--- docs/staticPage.lua
+++ docs/staticPage.lua
@@ -105,36 +105,48 @@
   local buffer = {}
   local function add(s)
     table.insert(buffer, s)
   end
 
   -- ucsc changes start
   
   -- debugging of meta info:
   -- print("vars")
   -- tprint(variables)
   -- print("meta")
   -- tprint(metadata)
 
 
   if metadata["title"] then
+    add("<!DOCTYPE HTML>")
+    add("<!-- DO NOT EDIT THE HTDOCS VERSION OF THIS FILE. THIS FILE IS AUTOMATICALLY")
+    add("     GENERATED FROM A MARKDOWN FILE IN kent/src/product. MAKE ANY EDITS TO")
+    add("     THIS PAGE THERE, THEN RUN MAKE in kent/src/product/mirrorDocs, AND FOLLOW THE")
+    add("     INSTRUCTIONS TO COMMIT THIS PAGE INTO git.")
+    add("     Please read the file kent/src/product/Note-To-QA.txt for details.")
+    add("     -->")
+    add("<!--#set var=\"TITLE\" value=\"" .. metadata["title"] .. "\" -->")
+    add("<!--#set var=\"ROOT\" value=\"..\" -->")
+    add("")
+    add("<!-- Relative paths to support mirror sites with non-standard GB docs install -->")
+    add("<!--#include virtual=\"$ROOT/inc/gbPageStart.html\" -->")
+    add("")
     add("<h1>" .. metadata["title"] .. "</h1>")
   else
     add("<h1>No title defined in document, first line must be % mytitle </h1>")
   end
 
-  add("<h2>Contents</h2>")
   for i, h in ipairs(headers) do
     idStr = simplifyId(h)
     add("<h6><a href='#" .. idStr .. "'>" .. h .. "</a></h6>")
   end
   -- ucsc change end
 
   add(body)
   if #notes > 0 then
     add('<ol class="footnotes">')
     for _,note in pairs(notes) do
       add(note)
     end
     add('</ol>')
   end
   return table.concat(buffer,'\n') .. '\n'
@@ -207,33 +219,30 @@
       src = escape(src, true)
       tit = escape(tit, true)
       s = escape(s, true)
   end
 
 
   return "<a href='" .. src .. "' title='" .. tit .. "'>" .. s .. "</a>"
 
 end
 
 function Image(s, src, tit, attr)
   return "<img src='" .. escape(src,true) .. "' title='" ..
          escape(tit,true) .. "'/>"
 end
 
-function RawInline(s)
-  return "<code>" .. escape(s) .. "</code>"
-end
 
 function Code(s, attr)
   return "<code" .. attributes(attr) .. ">" .. escape(s) .. "</code>"
 end
 
 function InlineMath(s)
   return "\\(" .. escape(s) .. "\\)"
 end
 
 function DisplayMath(s)
   return "\\[" .. escape(s) .. "\\]"
 end
 
 function SingleQuoted(s)
   return "&lsquo;" .. s .. "&rsquo;"
@@ -400,30 +409,34 @@
     add('</tr>')
   end
   local class = "even"
   for _, row in pairs(rows) do
     class = (class == "even" and "odd") or "even"
     add('<tr class="' .. class .. '">')
     for i,c in pairs(row) do
       add('<td align="' .. html_align(aligns[i]) .. '">' .. c .. '</td>')
     end
     add('</tr>')
   end
   add('</table')
   return table.concat(buffer,'\n')
 end
 
+function RawInline(s)
+  return "<code>" .. escape(s) .. "</code>"
+end
+
 function RawBlock(format, str)
   if format == "html" then
     return str
   else
     return ''
   end
 end
 
 function Div(s, attr)
   return "<div" .. attributes(attr) .. ">\n" .. s .. "</div>"
 end
 
 -- The following code will produce runtime warnings when you haven't defined
 -- all of the functions you need for the custom writer, so it's useful
 -- to include when you're working on a writer.