Documentation ¶
Index ¶
- Constants
- Variables
- func HTMLLink(text, URL string, isDirectory bool) string
- func InsertDoctype(htmldata []byte) []byte
- func MaterialHead() string
- func MessagePage(title, body, theme string) string
- func MessagePageBytes(title string, body []byte, theme string) []byte
- func NewTheme(theme string, body []byte, codestyle string)
- func NoPage(filename, theme string) []byte
- func OneLevelOfIndentation(data *[]byte, keyword string) string
- func SimpleHTMLPage(title, headline, inhead, body []byte) []byte
- func StyleAmber(amberdata []byte, url string) []byte
- func StyleHTML(htmldata []byte, url string) []byte
- func StyleHead(theme string) []byte
- func ThemeToCodeStyle(theme string) string
Constants ¶
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" )
const ( // DefaultCustomCodeStyle is the default chroma style for custom CSS // See: https://xyproto.github.io/splash/docs/all.html for an overview DefaultCustomCodeStyle = "algol" )
const MUICSS = `` /* 43314-byte string literal not displayed */
MUICSS is from http://cdn.muicss.com/mui-0.9.39-rc1/css/mui.min.css
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 ¶
var MetaKeywords = []string{"application-name", "author", "description", "generator", "keywords", "robots", "language", "googlebot", "Slurp", "bingbot", "geo.position", "geo.placename", "geo.region", "ICBM", "viewport"}
MetaKeywords contains a selection of allowed keywords for the HTML meta tag
Functions ¶
func HTMLLink ¶
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 ¶
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 ¶
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 ¶
MessagePageBytes provides the same functionalityt as MessagePage, but with []byte instead of string, and without closing </body></html>
func OneLevelOfIndentation ¶
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 ¶
SimpleHTMLPage provides a quick way to build a HTML page
func StyleAmber ¶
StyleAmber modifies Amber source code so that a link to the given stylesheet URL is added
func StyleHTML ¶
StyleHTML modifies HTML source code so that a link to the given stylesheet URL is added
func StyleHead ¶
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 ¶
ThemeToCodeStyle returns the code highlight style that the given theme implicates
Types ¶
This section is empty.