Skip to main content

Module render

Module render 

Source
Expand description

Markdown to a full page: the rendered file inside the document’s frame.

Re-exports§

pub use crate::markup::title;

Constants§

FRAME_IDS
The ids of devpage’s own frame — the page, the sidebar and its tree, the navbar, the theme corner and the comments — used by assets/style.css and assets/devpage.js. They all start with devpage-, so a heading’s id, taken from its text, matches one only if the heading spells it out; such a heading’s id gets -heading added, so a frame id is never a heading’s.

Functions§

doc
A doc: every chapter on one page, in order, with an outline of the chapters’ headings beside them. In print mode the outline and the live connection are left out and the page size is the doc’s paper.
escape
front_matter
The YAML of a page’s front matter: what lies between a --- on its first line and the next line that is ---, if the page opens with one.
html_open
The page’s <html> tag, carrying the served folder’s mount when it has one, for the page script and the design script to ask their endpoints under.
invalid
A document file that can’t be loaded: a page listing what is wrong with it.
markdown
Renders Markdown to HTML, highlighting fenced code (see highlight), turning an image of a design into its canvas (see embed_designs) and drawing each Mermaid fence (see diagrams).
markdown_in
Renders a page’s Markdown, the tags of widgets expanded first.
page
The whole page for one Markdown file: navigation, the rendered content and the scripts that mount its widgets and keep it live. comments is whether comments are on. found is the page’s problems, listed above it.
slides
A deck: every slide on its own 1920 × 1080 stage, scaled to the window as a whole, one shown at a time. In print mode each slide is one 16:9 page.
tab_title
A site page’s tab title: <page> · <site>, or just the site’s name when the page is titled like it (trimmed, ignoring case).