mirror of
https://github.com/facundoolano/jorge.git
synced 2024-12-25 21:58:28 +01:00
tweak org heading levels
This commit is contained in:
parent
6cc4077816
commit
974036e5a0
1 changed files with 6 additions and 1 deletions
|
@ -107,7 +107,12 @@ func (templ Template) Render(context map[string]interface{}) ([]byte, error) {
|
|||
if ext == ".org" {
|
||||
// org-mode rendering
|
||||
doc := org.New().Parse(bytes.NewReader(content), templ.SrcPath)
|
||||
contentStr, err := doc.Write(org.NewHTMLWriter())
|
||||
htmlWriter := org.NewHTMLWriter()
|
||||
|
||||
// make * -> h1, ** -> h2, etc
|
||||
htmlWriter.TopLevelHLevel = 1
|
||||
|
||||
contentStr, err := doc.Write(htmlWriter)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue