template package

import "code.pfad.fr/vanitydoc/template"

package template generates documentation for a given package.

Index

func Synopsis

Synopsis returns a cleaned version of the first sentence of the documentation

func WriteCSS

WriteCSS writes the default CSS to the given writer.

type Directory

Directory represents the sub-packages of a given package.

type GemtextRenderer

GemtextRenderer provides the generation of gemtext documentation.

func (GemtextRenderer) Execute

Execute applies a parsed template to the template data, and writes the output to w.

type HTMLRenderer

HTMLRenderer provides the generation of HTML documentation.

func (HTMLRenderer) Execute

Execute applies a parsed template to the template data, and writes the output to w.

func (HTMLRenderer) NotFound

Execute applies a parsed template to the template data, and writes the output to w.

type TemplateData

TemplateData stores all the data needed to render the documentation templates.

func NewTemplateData

NewTemplateData parses the provided pkgFS to prepare the template data.

func (TemplateData) AdjustedImportPath

AdjustedImportPath removes "std/" prefix (for showing the stdlib).

func (TemplateData) PageName

PageName returns the page name ("*** package" or "*** command" depending on the package name).

Source Files

ast.go common.go gemtext.go gemtext_comment.go html.go