package quill
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=96d35ce03dfbebd2313657273e24c2e2d20f9e6c7825b8518b69bd1d6ed5870f
sha512=90c5053731d4108f37c19430e45456063e872b04b8a1bbad064c356e1b18e69222de8bfcf4ec14757e71f18164ec6e4630ba770dbcb1291665de5418827d1465
doc/quill.book/Quill_book/Render/index.html
Module Quill_book.RenderSource
HTML rendering for project notebooks.
Converts notebook documents to HTML pages suitable for a static site. Text cells are rendered via cmarkit. Code cells include syntax-highlighted source and execution outputs.
escape_html s escapes HTML special characters in s.
notebook_output_path nb is the output HTML path for nb relative to the project root (e.g. "chapters/01-intro/index.html").
chapter_html doc renders doc to an HTML content fragment. Code cell outputs are rendered after their source blocks: stdout as <pre>, images as <img>, and errors with appropriate styling.
val toc_html :
Quill_project.t ->
current:Quill_project.notebook ->
root_path:string ->
stringtoc_html project ~current ~root_path renders the sidebar table of contents with current highlighted as the active notebook. root_path is the relative path from the notebook to the project root (e.g. "../../").
val page_html :
book_title:string ->
chapter_title:string ->
toc_html:string ->
prev:(string * string) option ->
next:(string * string) option ->
root_path:string ->
content:string ->
edit_url:string option ->
live_reload_script:string ->
stringpage_html wraps a content fragment in the full page template with navigation. prev and next are (url, title) pairs. root_path is the relative path from the notebook to the project root (e.g. "../../"). edit_url is an optional URL for an "Edit this page" link. live_reload_script is empty for static builds or a <script> tag for live serve mode.
strip_html_tags s removes HTML tags from s and collapses whitespace.
replace_all ~pattern ~with_ s replaces all occurrences of pattern in s with with_.
print_page_html ~book_title ~chapters renders a print page containing all chapters. Each element of chapters is a (title, content_html) pair.