assets

package
v0.9.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 25, 2026 License: MIT Imports: 3 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package assets embeds the client JavaScript, CSS, and third-party libraries

Index

Constants

This section is empty.

Variables

View Source
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 ClientFS

func ClientFS() fs.FS

ClientFS returns the embedded client files

func GetChartJS

func GetChartJS() ([]byte, error)

GetChartJS returns the Chart.js library

func GetClientCSS

func GetClientCSS() ([]byte, error)

GetClientCSS returns the browser CSS bundle

func GetClientJS

func GetClientJS() ([]byte, error)

GetClientJS returns the browser JavaScript bundle

func GetMermaidJS

func GetMermaidJS() ([]byte, error)

GetMermaidJS returns the Mermaid.js library

func GetPicoCSS

func GetPicoCSS() ([]byte, error)

GetPicoCSS returns the Pico CSS framework

func GetPrismCSS

func GetPrismCSS() ([]byte, error)

GetPrismCSS returns the vendored light Prism.js theme CSS.

func GetPrismJS

func GetPrismJS() ([]byte, error)

GetPrismJS returns the Prism.js core library

func GetPrismLanguage

func GetPrismLanguage(lang string) ([]byte, error)

GetPrismLanguage returns a Prism language component. The language must be in the SupportedPrismLanguages whitelist.

func GetPrismLineHighlightCSS added in v0.2.0

func GetPrismLineHighlightCSS() ([]byte, error)

GetPrismLineHighlightCSS returns the Prism Line Highlight plugin CSS.

func GetPrismLineHighlightJS added in v0.2.0

func GetPrismLineHighlightJS() ([]byte, error)

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

func GetPrismLineNumbersCSS() ([]byte, error)

GetPrismLineNumbersCSS returns the Prism Line Numbers plugin CSS.

func GetPrismLineNumbersJS added in v0.2.0

func GetPrismLineNumbersJS() ([]byte, error)

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL