template package

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

package template generates documentation for a given package.

Index

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.

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) PageName

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

Bugs

no idea how build tags should be managed

Source Files

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