diff --git a/html.go b/html.go index e0a6c69c..e408e289 100644 --- a/html.go +++ b/html.go @@ -82,6 +82,13 @@ type Html struct { title string // document title css string // optional css file url (used with HTML_COMPLETE_PAGE) + // The optional 'meta' map holds additional meta tags to + // place into the final document's header. + // Format: + // key: name="author" + // val: foo barrington + meta map[string]string + parameters HtmlRendererParameters // table of contents data @@ -131,6 +138,8 @@ func HtmlRendererWithParameters(flags int, title string, css: css, parameters: renderParameters, + meta: make(map[string]string), + headerCount: 0, currentLevel: 0, toc: new(bytes.Buffer), @@ -685,6 +694,14 @@ func (options *Html) DocumentHeader(out *bytes.Buffer) { out.WriteString(" \n") + // plug the user-specified tags + if len(options.meta) > 0 { + for k, v := range options.meta { + out.WriteString(" \n") + } + } if options.css != "" { out.WriteString("