da335975e0d5712f47ee0d19b0eb5003d1a1b7f0 lrnassar Mon Apr 27 14:16:44 2026 -0700 Add sticky sidebar table of contents to /docs/ pages, ReadTheDocs-style. refs #36894 staticPage.lua: wrap doc body in a Bootstrap row with a col-md-2 sidebar holding a .docs-toc nav list and a col-md-10 content column. Collect both lev==1 and lev==2 headings into the TOC and emit id attributes on
" .. escape(s) .. ""
end
function InlineMath(s)
return "\\(" .. escape(s) .. "\\)"
end
function DisplayMath(s)
return "\\[" .. escape(s) .. "\\]"
end
function SingleQuoted(s)
return "‘" .. s .. "’"
end
function DoubleQuoted(s)
return "“" .. s .. "”"
end
function Note(s)
local num = #notes + 1
-- insert the back reference right before the final closing tag.
s = string.gsub(s,
'(.*)', '%1 ↩')
-- add a list item with the note to the note table.
table.insert(notes, '\n" .. s .. "\n
" end -- lev is an integer, the header level. function Header(lev, s, attr) local lines = { } if lev == 1 then idStr = simplifyId(s) - table.insert(headers, s) + table.insert(headers, {text = s, id = idStr}) - table.insert(lines, "") - table.insert(lines, "\n" .. s .. "\n" end function HorizontalRule() return "
" .. escape(s) ..
""
end
end
function BulletList(items)
local buffer = {}
for _, item in pairs(items) do
table.insert(buffer, "' .. caption .. '
\n| ' .. h .. ' | ') empty_header = empty_header and h == "" end if empty_header then head = "" else add('
|---|
| ' .. c .. ' | ') end add('