Documentation ¶
Index ¶
Constants ¶
View Source
const ( // AtomAuthorName is the name of the author to include in Atom feeds. AtomAuthorName = "Brandur Leach" // AtomTag is a stable constant to use in Atom tags. AtomTag = "brandur.org" // DataDir is where various TOML files for quantified self statistics // reside. These are pulled from another project which updates them // automatically. DataDir = "./data" // LayoutsDir is the source directory for view layouts. LayoutsDir = "./layouts" // MainLayout is the site's main layout in the deprecated ACE templating // system. This is no longer used except in a few near retired pages like // runs and Twitter. MainLayout = LayoutsDir + "/main.ace" // NanoglyphsLayout is the layout for a Nanoglyph issue (an email // newsletter). NanoglyphsLayout = LayoutsDir + "/nanoglyphs.ace" // PassagesLayout is the layout for a Passages & Glass issue (an email // newsletter). PassagesLayout = LayoutsDir + "/passages.ace" // TempDir is a temporary directory used to download images that will be // processed and such. TempDir = "./tmp" // TitleSuffix is the suffix to add to the end of page and Atom titles. TitleSuffix = " — brandur.org" // ViewsDir is the source directory for views. ViewsDir = "./views" )
View Source
const TwitterInfo = template.HTML(`<p>Find me on Twitter at ` +
`<strong><a href="https://twitter.com/brandur">@brandur</a></strong>.</p>`)
TwitterInfo is some HTML that includes a Twitter link which can be appended to the publishing info of various content.
Variables ¶
View Source
var HTMLTemplateFuncMap = mtemplate.CombineFuncMaps( stemplate.FuncMap, mtemplate.FuncMap, mtemplatemd.FuncMap, )
HTMLTemplateFuncMap is a function map of template helpers which is the combined version of the maps from ftemplate, mtemplate, and mtemplatemd.
View Source
var TextTemplateFuncMap = mtemplate.HTMLFuncMapToText(HTMLTemplateFuncMap)
TextTemplateFuncMap is a combined set of template helpers for text templates.
Functions ¶
func ExitWithError ¶
func ExitWithError(err error)
ExitWithError prints the given error to stderr and exits with a status of 1.
func ExtractSlug ¶
ExtractSlug gets a slug for the given filename by using its basename stripped of file extension.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.