Documentation
¶
Overview ¶
Package document writes Markdown slides into a portable HTML bundle.
Index ¶
- func WriteCascadingStyleSheet(w io.Writer, css string) (err error)
- func WriteEscapedHTML(w io.Writer, s string) error
- func WriteEscapedJSON(w io.Writer, s []byte) (err error)
- func WriteFooter(w io.Writer) (err error)
- func WriteHeader(w io.Writer, meta *Metadata) (err error)
- func WriteJavascriptModuleES6(w io.Writer, js string) (err error)
- type DataWriter
- type Metadata
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WriteEscapedHTML ¶
code borrowed from `html` standard library package, simplified
func WriteEscapedJSON ¶
WriteEscapedJSON writes a string a JSON value with HTML escape codes applied. Double quotes, new lines, and carrier returns are escaped twice. This preserves JSON objects embedded into HTML element body.
func WriteFooter ¶
func WriteJavascriptModuleES6 ¶
WriteJavascriptModuleES6 embeds an ES6 Javascript module into an io.Writer. ES6 modules cannot be loaded from local file system due to browser CORS restrictions. The `<script>` tag must be designated as a module.
Types ¶
type DataWriter ¶
type DataWriter struct {
// contains filtered or unexported fields
}
func NewDataWriter ¶
func (*DataWriter) Add ¶
func (d *DataWriter) Add(data []byte) error
func (*DataWriter) Close ¶
func (d *DataWriter) Close() (err error)
func (*DataWriter) Open ¶
func (d *DataWriter) Open(ID string) (err error)
Directories
¶
| Path | Synopsis |
|---|---|
|
Package review presents a printable test constructed using a set of questions extracted from Markdown list items.
|
Package review presents a printable test constructed using a set of questions extracted from Markdown list items. |
|
Package templates embeds HTML, Javascript, and CSS presentation components.
|
Package templates embeds HTML, Javascript, and CSS presentation components. |
Click to show internal directories.
Click to hide internal directories.