Documentation

Index

Constants

View Source
const (
	// DefaultCSSFilename is the default CSS stylesheet
	DefaultCSSFilename = "style.css"

	// DefaultGCSSFilename is the default GCSS stylesheet
	DefaultGCSSFilename = "style.gcss"

	// DefaultTheme is the default theme when rendering Markdown and for error pages
	DefaultTheme = "default"
)
View Source
const (
	// DefaultCustomCodeStyle is the default chroma style for custom CSS
	// See: https://xyproto.github.io/splash/docs/all.html for an overview
	DefaultCustomCodeStyle = "algol"
)
View Source
const MUICSS = `` /* 43314-byte string literal not displayed */

    MUICSS is from http://cdn.muicss.com/mui-0.9.39-rc1/css/mui.min.css

    View Source
    const MUIJS = `` /* 19425-byte string literal not displayed */
    

      MUIJS is from http://cdn.muicss.com/mui-0.9.39-rc1/js/mui.min.js

      Variables

      View Source
      var (
      	// MetaKeywords contains a selection of allowed keywords for the HTML meta tag
      	MetaKeywords = []string{"application-name", "author", "description", "generator", "keywords", "robots", "language", "googlebot", "Slurp", "bingbot", "geo.position", "geo.placename", "geo.region", "ICBM", "viewport"}
      )

      Functions

      func HTMLLink(text, url string, isDirectory bool) string

        HTMLLink builds an HTML link given the link text, the URL to a file/directory and a boolean that is true if the given URL is to a directory.

        func InsertDoctype

        func InsertDoctype(htmldata []byte) []byte

          InsertDoctype inserts <doctype html> to the HTML, if missing. Does not check if the given data is HTML. Assumes it to be HTML.

          func MaterialHead

          func MaterialHead() string

            MaterialHead enables the Material style by adding CSS and JS tags that can go in a header

            func MessagePage

            func MessagePage(title, body, theme string) string

              MessagePage is an easy way to output a HTML page only given a title, the body (will be placed between the <body></body> tags) and the name of one of the built-in themes. Does not close <body> and <html>. Deprecated

              func MessagePageBytes

              func MessagePageBytes(title string, body []byte, theme string) []byte

                MessagePageBytes provides the same functionalityt as MessagePage, but with []byte instead of string, and without closing </body></html>

                func NewTheme

                func NewTheme(theme string, body []byte, codestyle string)

                  NewTheme adds a new built-in theme

                  func NoPage

                  func NoPage(filename, theme string) []byte

                    NoPage provides the same functionality as NoPage, but returns []byte

                    func OneLevelOfIndentation

                    func OneLevelOfIndentation(data *[]byte, keyword string) string

                      OneLevelOfIndentation finds one level of whitespace, given indented data and a keyword to extract the whitespace in front of.

                      Returns either an empty string or the whitespace that represents one step of indentation in the given source code data.

                      func SimpleHTMLPage

                      func SimpleHTMLPage(title, headline, inhead, body []byte) []byte

                        SimpleHTMLPage provides a quick way to build a HTML page

                        func StyleAmber

                        func StyleAmber(amberdata []byte, url string) []byte

                          StyleAmber modifies Amber source code so that a link to the given stylesheet URL is added

                          func StyleHTML

                          func StyleHTML(htmldata []byte, url string) []byte

                            StyleHTML modifies HTML source code so that a link to the given stylesheet URL is added

                            func StyleHead

                            func StyleHead(theme string) []byte

                              StyleHead returns contents that goes in "<head>", as bytes. This is either CSS wrapped in a "<style>" tag, or "<link>" tags to CSS and JS.

                              func ThemeToCodeStyle

                              func ThemeToCodeStyle(theme string) string

                                ThemeToCodeStyle returns the code highlight style that the given theme implicates

                                Types

                                This section is empty.