Documentation
¶
Overview ¶
Package assets embeds the client JavaScript, CSS, and vendor libraries
Index ¶
- Variables
- func ClientFS() fs.FS
- func GetChartJS() ([]byte, error)
- func GetClientCSS() ([]byte, error)
- func GetClientJS() ([]byte, error)
- func GetMermaidJS() ([]byte, error)
- func GetPicoCSS() ([]byte, error)
- func GetPrismCSS() ([]byte, error)
- func GetPrismJS() ([]byte, error)
- func GetPrismLanguage(lang string) ([]byte, error)
- func GetPrismLineHighlightCSS() ([]byte, error)
- func GetPrismLineHighlightJS() ([]byte, error)
- func GetPrismLineNumbersCSS() ([]byte, error)
- func GetPrismLineNumbersJS() ([]byte, error)
Constants ¶
This section is empty.
Variables ¶
var SupportedPrismLanguages = map[string]bool{ "go": true, "javascript": true, "jsx": true, "markup": true, "css": true, "yaml": true, "json": true, "bash": true, "markdown": true, }
SupportedPrismLanguages is the whitelist of available Prism language components
Functions ¶
func GetClientJS ¶
GetClientJS returns the browser JavaScript bundle
func GetPrismCSS ¶
GetPrismCSS returns the vendored light Prism.js theme CSS.
func GetPrismLanguage ¶
GetPrismLanguage returns a Prism language component. The language must be in the SupportedPrismLanguages whitelist.
func GetPrismLineHighlightCSS ¶ added in v0.2.0
GetPrismLineHighlightCSS returns the Prism Line Highlight plugin CSS.
func GetPrismLineHighlightJS ¶ added in v0.2.0
GetPrismLineHighlightJS returns the Prism Line Highlight plugin JS, vendored from prismjs@1.29.0. Used by `LANG include="..." highlight="3-5"` fences to draw an emphasis overlay on selected lines.
func GetPrismLineNumbersCSS ¶ added in v0.2.0
GetPrismLineNumbersCSS returns the Prism Line Numbers plugin CSS.
func GetPrismLineNumbersJS ¶ added in v0.2.0
GetPrismLineNumbersJS returns the Prism Line Numbers plugin JS, which numbers lines in the gutter — used by every `LANG include="..."` block so the snippet has stable coordinates the footer label (`counter.go:13-35`) and the optional `highlight=` overlay can refer to.
Types ¶
This section is empty.