diff --git a/org/document.go b/org/document.go index 510fe51..0f016c1 100644 --- a/org/document.go +++ b/org/document.go @@ -86,7 +86,7 @@ func New() *Configuration { DefaultSettings: map[string]string{ "TODO": "TODO | DONE", "EXCLUDE_TAGS": "noexport", - "OPTIONS": "toc:t <:t e:t f:t pri:t todo:t tags:t", + "OPTIONS": "toc:t <:t e:t f:t pri:t todo:t tags:t title:t", }, Log: log.New(os.Stderr, "go-org: ", 0), ReadFile: ioutil.ReadFile, @@ -174,6 +174,7 @@ func (d *Document) Get(key string) string { // - < (export timestamps) // - e (export org entities) // - f (export footnotes) +// - title (export title) // - toc (export table of content. an int limits the included org headline lvl) // - todo (export headline todo status) // - pri (export headline priority) diff --git a/org/html_writer.go b/org/html_writer.go index 6c230a8..3a5f97a 100644 --- a/org/html_writer.go +++ b/org/html_writer.go @@ -92,7 +92,7 @@ func (w *HTMLWriter) WriterWithExtensions() Writer { func (w *HTMLWriter) Before(d *Document) { w.document = d w.log = d.Log - if title := d.Get("TITLE"); title != "" { + if title := d.Get("TITLE"); title != "" && w.document.GetOption("title") != "nil" { titleDocument := d.Parse(strings.NewReader(title), d.Path) if titleDocument.Error == nil { title = w.WriteNodesAsString(titleDocument.Nodes...)