diff --git a/org/html.go b/org/html.go index 74f277a..09cfc3c 100644 --- a/org/html.go +++ b/org/html.go @@ -163,9 +163,11 @@ func (w *HTMLWriter) writeDrawer(d Drawer) { w.writeNodes(d.Children...) } -func (w *HTMLWriter) writeKeyword(k Keyword) { - if k.Key == "HTML" { - w.WriteString(k.Value + "\n") +func (w *HTMLWriter) writeKeyword(kw Keyword) { + if k, v := kw.Key, kw.Value; k == "HTML" { + w.WriteString(v + "\n") + } else if k == "HUGO" && v == "more" { + w.WriteString("\n") } } diff --git a/org/testdata/keywords.html b/org/testdata/keywords.html index 135c47e..88d7ebc 100644 --- a/org/testdata/keywords.html +++ b/org/testdata/keywords.html @@ -16,3 +16,7 @@ and an image with custom html attributes and a caption kittens! +

+This will be exported as <!–more–> just for hugo +

+ diff --git a/org/testdata/keywords.org b/org/testdata/keywords.org index e6b8ce9..bfd594c 100644 --- a/org/testdata/keywords.org +++ b/org/testdata/keywords.org @@ -12,3 +12,7 @@ and an image with custom html attributes and a caption #+ATTR_HTML: :style height: 100%; :id overwritten #+ATTR_HTML: :style border: 10px solid black; :id kittens [[https://placekitten.com/200/200#.png]] + + +This will be exported as just for hugo +#+HUGO: more diff --git a/org/testdata/keywords.pretty_org b/org/testdata/keywords.pretty_org index e6b8ce9..bfd594c 100644 --- a/org/testdata/keywords.pretty_org +++ b/org/testdata/keywords.pretty_org @@ -12,3 +12,7 @@ and an image with custom html attributes and a caption #+ATTR_HTML: :style height: 100%; :id overwritten #+ATTR_HTML: :style border: 10px solid black; :id kittens [[https://placekitten.com/200/200#.png]] + + +This will be exported as just for hugo +#+HUGO: more