Add support for Table of Contents

This commit is contained in:
Niklas Fasching 2018-12-26 16:00:27 +01:00
parent eb7db9b968
commit d921a68a55
7 changed files with 218 additions and 41 deletions

View file

@ -4,12 +4,14 @@ Take a look at [[https://niklasfasching.github.io/go-org/][github pages]] for so
* next * next
- more keywords: https://orgmode.org/manual/In_002dbuffer-settings.html - more keywords: https://orgmode.org/manual/In_002dbuffer-settings.html
- table of contents - table of contents
- see hugo ExtractTOC
- loop the headlines and print an hX for each headline, ul for children
- rethink frontmatter - rethink frontmatter
- keyword customizable mapping. e.g. #+ARRAY_KWS: list kws that should become []string - use toml/yaml/json frontmatter from hugo (see [[https://github.com/gohugoio/hugo/issues/5436][hugo #5436]]):
- json/yaml values. - complex values are a requirement of hugo, not Org mode
- +lisp syntax from [[https://github.com/kaushalmodi/ox-hugo/blob/master/ox-hugo.el#L2791][ox-hugo]]+ - by giving up on the ability to mix front matter in org keyword (=#+=) and other formats we save a lot of complexity (that has little benefit)
- too much complexity and not native to Org mode, i.e. does not even increase compatibility - Maybe allow for []string via KEYWORD[]: Tag Foo Bar - can be done in hugo
- use toml/yaml/json frontmatter from hugo (see [[https://github.com/gohugoio/hugo/issues/5436][hugo #5436]]) -> the other problem is that org mode normally allows markup in the title - but we would have to render - and to what format
** headlines ** headlines
- auto-generate unique ids: see [[https://github.com/kaushalmodi/ox-hugo/blob/8472cf2d8667754c9da3728255634e8001a1da6d/ox-hugo.el#L1785-L1850][ox-hugo]] - auto-generate unique ids: see [[https://github.com/kaushalmodi/ox-hugo/blob/8472cf2d8667754c9da3728255634e8001a1da6d/ox-hugo.el#L1785-L1850][ox-hugo]]
- what about name conflicts? - what about name conflicts?
@ -41,3 +43,4 @@ Nonetheless, the html output can be compared by taking a look in the developer c
- https://code.orgmode.org/bzg/org-mode/src/master/lisp/org-element.el - https://code.orgmode.org/bzg/org-mode/src/master/lisp/org-element.el
- mostly those & ox-html.el, but yeah, all of [[https://code.orgmode.org/bzg/org-mode/src/master/lisp/]] - mostly those & ox-html.el, but yeah, all of [[https://code.orgmode.org/bzg/org-mode/src/master/lisp/]]
- existing Org mode implementations: [[https://github.com/emacsmirror/org][org]], [[https://github.com/bdewey/org-ruby/blob/master/spec/html_examples][org-ruby]], [[https://github.com/chaseadamsio/goorgeous/][goorgeous]], [[https://github.com/jgm/pandoc/][pandoc]] - existing Org mode implementations: [[https://github.com/emacsmirror/org][org]], [[https://github.com/bdewey/org-ruby/blob/master/spec/html_examples][org-ruby]], [[https://github.com/chaseadamsio/goorgeous/][goorgeous]], [[https://github.com/jgm/pandoc/][pandoc]]

View file

@ -15,6 +15,7 @@ type Document struct {
tokens []token tokens []token
Nodes []Node Nodes []Node
Footnotes Footnotes Footnotes Footnotes
Outline Outline
StatusKeywords []string StatusKeywords []string
MaxEmphasisNewLines int MaxEmphasisNewLines int
AutoLink bool AutoLink bool
@ -71,6 +72,7 @@ func FrontMatterHandler(fm FrontMatter, k, v string) error {
} }
func NewDocument() *Document { func NewDocument() *Document {
outlineSection := &Section{}
return &Document{ return &Document{
Footnotes: Footnotes{ Footnotes: Footnotes{
Title: "Footnotes", Title: "Footnotes",
@ -78,6 +80,7 @@ func NewDocument() *Document {
}, },
AutoLink: true, AutoLink: true,
MaxEmphasisNewLines: 1, MaxEmphasisNewLines: 1,
Outline: Outline{outlineSection, outlineSection, 0},
BufferSettings: map[string]string{}, BufferSettings: map[string]string{},
DefaultSettings: map[string]string{ DefaultSettings: map[string]string{
"TODO": "TODO | DONE", "TODO": "TODO | DONE",
@ -232,6 +235,12 @@ func (d *Document) addFootnote(name string, definition *FootnoteDefinition) {
d.Footnotes.addOrder = append(d.Footnotes.addOrder, name) d.Footnotes.addOrder = append(d.Footnotes.addOrder, name)
} }
func (d *Document) addHeadline(headline *Headline) int {
d.Outline.last.add(&Section{Headline: headline})
d.Outline.count++
return d.Outline.count
}
func tokenize(line string) token { func tokenize(line string) token {
for _, lexFn := range lexFns { for _, lexFn := range lexFns {
if token, ok := lexFn(line); ok { if token, ok := lexFn(line); ok {

View file

@ -1,12 +1,26 @@
package org package org
import ( import (
"fmt"
"regexp" "regexp"
"strings" "strings"
"unicode" "unicode"
) )
type Outline struct {
*Section
last *Section
count int
}
type Section struct {
Headline *Headline
Parent *Section
Children []*Section
}
type Headline struct { type Headline struct {
Index int
Lvl int Lvl int
Status string Status string
Priority string Priority string
@ -29,6 +43,9 @@ func lexHeadline(line string) (token, bool) {
func (d *Document) parseHeadline(i int, parentStop stopFn) (int, Node) { func (d *Document) parseHeadline(i int, parentStop stopFn) (int, Node) {
t, headline := d.tokens[i], Headline{} t, headline := d.tokens[i], Headline{}
headline.Lvl = len(t.matches[1]) headline.Lvl = len(t.matches[1])
headline.Index = d.addHeadline(&headline)
text := t.content text := t.content
todoKeywords := strings.FieldsFunc(d.Get("TODO"), func(r rune) bool { return unicode.IsSpace(r) || r == '|' }) todoKeywords := strings.FieldsFunc(d.Get("TODO"), func(r rune) bool { return unicode.IsSpace(r) || r == '|' })
for _, k := range todoKeywords { for _, k := range todoKeywords {
@ -64,3 +81,19 @@ func (d *Document) parseHeadline(i int, parentStop stopFn) (int, Node) {
headline.Children = nodes headline.Children = nodes
return consumed + 1, headline return consumed + 1, headline
} }
func (h Headline) ID() string {
if customID, ok := h.Properties.Get("CUSTOM_ID"); ok {
return customID
}
return fmt.Sprintf("headline-%d", h.Index)
}
func (parent *Section) add(current *Section) {
if parent.Headline == nil || parent.Headline.Lvl < current.Headline.Lvl {
parent.Children = append(parent.Children, current)
current.Parent = parent
} else {
parent.Parent.add(current)
}
}

View file

@ -4,6 +4,7 @@ import (
"fmt" "fmt"
"html" "html"
"log" "log"
"regexp"
"strings" "strings"
"unicode" "unicode"
@ -42,6 +43,8 @@ var listItemStatuses = map[string]string{
"X": "checked", "X": "checked",
} }
var cleanHeadlineTitleForHTMLAnchorRegexp = regexp.MustCompile(`</?a[^>]*>`) // nested a tags are not valid HTML
func NewHTMLWriter() *HTMLWriter { func NewHTMLWriter() *HTMLWriter {
return &HTMLWriter{ return &HTMLWriter{
htmlEscape: true, htmlEscape: true,
@ -66,6 +69,7 @@ func (w *HTMLWriter) nodesAsString(nodes ...Node) string {
func (w *HTMLWriter) before(d *Document) { func (w *HTMLWriter) before(d *Document) {
w.excludeTags = strings.Fields(d.Get("EXCLUDE_TAGS")) w.excludeTags = strings.Fields(d.Get("EXCLUDE_TAGS"))
w.log = d.Log w.log = d.Log
w.writeOutline(d)
} }
func (w *HTMLWriter) after(d *Document) { func (w *HTMLWriter) after(d *Document) {
@ -201,6 +205,31 @@ func (w *HTMLWriter) writeFootnotes(d *Document) {
w.WriteString("</div>\n</div>\n") w.WriteString("</div>\n</div>\n")
} }
func (w *HTMLWriter) writeOutline(d *Document) {
if len(d.Outline.Children) != 0 {
w.WriteString("<nav>\n<ul>\n")
for _, section := range d.Outline.Children {
w.writeSection(section)
}
w.WriteString("</ul>\n</nav>\n")
}
}
func (w *HTMLWriter) writeSection(section *Section) {
w.WriteString("<li>\n")
h := section.Headline
title := cleanHeadlineTitleForHTMLAnchorRegexp.ReplaceAllString(w.nodesAsString(h.Title...), "")
w.WriteString(fmt.Sprintf("<a href=\"#%s\">%s</a>\n", h.ID(), title))
if len(section.Children) != 0 {
w.WriteString("<ul>\n")
for _, section := range section.Children {
w.writeSection(section)
}
w.WriteString("</ul>\n")
}
w.WriteString("</li>\n")
}
func (w *HTMLWriter) writeHeadline(h Headline) { func (w *HTMLWriter) writeHeadline(h Headline) {
for _, excludeTag := range w.excludeTags { for _, excludeTag := range w.excludeTags {
for _, tag := range h.Tags { for _, tag := range h.Tags {
@ -210,12 +239,7 @@ func (w *HTMLWriter) writeHeadline(h Headline) {
} }
} }
if id, ok := h.Properties.Get("CUSTOM_ID"); ok { w.WriteString(fmt.Sprintf(`<h%d id="%s">`, h.Lvl, h.ID()) + "\n")
w.WriteString(fmt.Sprintf(`<h%d id="%s">`, h.Lvl, id) + "\n")
} else {
w.WriteString(fmt.Sprintf("<h%d>\n", h.Lvl))
}
if h.Status != "" { if h.Status != "" {
w.WriteString(fmt.Sprintf(`<span class="todo">%s</span>`, h.Status) + "\n") w.WriteString(fmt.Sprintf(`<span class="todo">%s</span>`, h.Status) + "\n")
} }

View file

@ -1,4 +1,14 @@
<h1> <nav>
<ul>
<li>
<a href="#headline-1">Using some footnotes</a>
</li>
<li>
<a href="#headline-2">Footnotes</a>
</li>
</ul>
</nav>
<h1 id="headline-1">
Using some footnotes Using some footnotes
</h1> </h1>
<ul> <ul>
@ -24,7 +34,7 @@ Rather, they are gathered and exported at the end of the document in the footnot
</p> </p>
</li> </li>
</ul> </ul>
<h1> <h1 id="headline-2">
Footnotes Footnotes
</h1> </h1>
<p> <p>

View file

@ -1,4 +1,26 @@
<h1> <nav>
<ul>
<li>
<a href="#headline-1">Simple Headline <code class="statistic">[1/2]</code></a>
</li>
<li>
<a href="#headline-2">Headline with todo status &amp; priority</a>
</li>
<li>
<a href="#this-will-be-the-id-of-the-headline">Headline with TODO status</a>
</li>
<li>
<a href="#headline-4">Headline with tags &amp; priority</a>
</li>
<li>
<a href="#headline-5">headline with custom status</a>
</li>
<li>
<a href="#headline-6">excluded headline</a>
</li>
</ul>
</nav>
<h1 id="headline-1">
Simple Headline <code class="statistic">[1/2]</code> Simple Headline <code class="statistic">[1/2]</code>
</h1> </h1>
<ul> <ul>
@ -20,7 +42,7 @@ not just where they are actually meant to be - even here &gt; <code class="stati
</p> </p>
</li> </li>
</ul> </ul>
<h1> <h1 id="headline-2">
<span class="todo">TODO</span> <span class="todo">TODO</span>
<span class="priority">[B]</span> <span class="priority">[B]</span>
Headline with todo status &amp; priority Headline with todo status &amp; priority
@ -32,7 +54,7 @@ Headline with TODO status
<p> <p>
we can link to headlines that define a custom_id: <a href="#this-will-be-the-id-of-the-headline">#this-will-be-the-id-of-the-headline</a> we can link to headlines that define a custom_id: <a href="#this-will-be-the-id-of-the-headline">#this-will-be-the-id-of-the-headline</a>
</p> </p>
<h1> <h1 id="headline-4">
<span class="priority">[A]</span> <span class="priority">[A]</span>
Headline with tags &amp; priority&#xa0;&#xa0;&#xa0;<span class="tags"><span>foo</span>&#xa0;<span>bar</span></span> Headline with tags &amp; priority&#xa0;&#xa0;&#xa0;<span class="tags"><span>foo</span>&#xa0;<span>bar</span></span>
</h1> </h1>
@ -45,7 +67,7 @@ This is inside the drawer
<p> <p>
Still outside the drawer Still outside the drawer
</p> </p>
<h1> <h1 id="headline-5">
<span class="todo">CUSTOM</span> <span class="todo">CUSTOM</span>
headline with custom status headline with custom status
</h1> </h1>

124
org/testdata/misc.html vendored
View file

@ -1,12 +1,88 @@
<h2> <nav>
<ul>
<li>
<a href="#headline-1">issues from goorgeous (free test cases, yay!)</a>
</li>
<li>
<a href="#headline-2">#19: Support #+HTML</a>
</li>
<li>
<a href="#headline-3">#29: Support verse block</a>
</li>
<li>
<a href="#headline-4">#31: Support #+INCLUDE</a>
</li>
<li>
<a href="#headline-5">#33: Wrong output when mixing html with Org mode</a>
</li>
<li>
<a href="#headline-6">#46: Support for symbols like ndash and mdash</a>
</li>
<li>
<a href="#headline-7">#47: Consecutive <code>code</code> wrapped text gets joined</a>
</li>
<li>
<a href="#headline-8">#50: LineBreaks in lists are preserved</a>
</li>
<li>
<a href="#headline-9">#68: Quote block with inline markup</a>
</li>
<li>
<a href="#headline-10">#72: Support for #+ATTR_HTML</a>
</li>
<li>
<a href="#headline-11">#75: Not parsing nested lists correctly</a>
</li>
<li>
<a href="#headline-12">#77: Recognize <code class="verbatim">code</code>— as code plus dash</a>
</li>
<li>
<a href="#headline-13">#78: Emphasis at beginning of line</a>
</li>
<li>
<a href="#headline-14">#82: Crash on empty headline</a>
</li>
<li>
<a href="#headline-15"></a>
</li>
<li>
<a href="#headline-16">#84: Paragraphs that are not followed by an empty line are not parsed correctly</a>
</li>
<li>
<a href="#headline-17">Foo</a>
</li>
<li>
<a href="#headline-18">Bar</a>
</li>
<li>
<a href="#headline-19">#86: Multiple hyphens not converted to dashes</a>
</li>
<li>
<a href="#headline-20">#87: Markup in footnotes is rendered literally</a>
</li>
<li>
<a href="#headline-21">issues (wrongly) filed with hugo</a>
</li>
<li>
<a href="#headline-22">#3874 exporting images in org mode</a>
</li>
<li>
<a href="#headline-23">#4006 source code blocks in org not rendered correctly</a>
</li>
<li>
<a href="#headline-24">Footnotes</a>
</li>
</ul>
</nav>
<h2 id="headline-1">
issues from goorgeous (free test cases, yay!) issues from goorgeous (free test cases, yay!)
</h2> </h2>
<h3> <h3 id="headline-2">
<span class="todo">DONE</span> <span class="todo">DONE</span>
<a href="https://github.com/chaseadamsio/goorgeous/issues/19">#19</a>: Support #+HTML <a href="https://github.com/chaseadamsio/goorgeous/issues/19">#19</a>: Support #+HTML
</h3> </h3>
<p style="border: 1px dotted grey">neato!</p> <p style="border: 1px dotted grey">neato!</p>
<h3> <h3 id="headline-3">
<span class="todo">DONE</span> <span class="todo">DONE</span>
<a href="https://github.com/chaseadamsio/goorgeous/issues/29">#29:</a> Support verse block <a href="https://github.com/chaseadamsio/goorgeous/issues/29">#29:</a> Support verse block
</h3> </h3>
@ -23,7 +99,7 @@ or even a <strong>totally</strong> <em>custom</em> kind of block
crazy ain&#39;t it? crazy ain&#39;t it?
</p> </p>
</div> </div>
<h3> <h3 id="headline-4">
<span class="todo">DONE</span> <span class="todo">DONE</span>
<a href="https://github.com/chaseadamsio/goorgeous/issues/31">#31</a>: Support #+INCLUDE <a href="https://github.com/chaseadamsio/goorgeous/issues/31">#31</a>: Support #+INCLUDE
</h3> </h3>
@ -115,7 +191,7 @@ deploy:
</pre> </pre>
</li> </li>
</ul> </ul>
<h3> <h3 id="headline-5">
<span class="todo">DONE</span> <span class="todo">DONE</span>
<a href="https://github.com/chaseadamsio/goorgeous/issues/33">#33</a>: Wrong output when mixing html with Org mode <a href="https://github.com/chaseadamsio/goorgeous/issues/33">#33</a>: Wrong output when mixing html with Org mode
</h3> </h3>
@ -133,7 +209,7 @@ deploy:
</tbody> </tbody>
</table> </table>
</div> </div>
<h3> <h3 id="headline-6">
<span class="todo">DONE</span> <span class="todo">DONE</span>
<a href="https://github.com/chaseadamsio/goorgeous/issues/46">#46</a>: Support for symbols like ndash and mdash <a href="https://github.com/chaseadamsio/goorgeous/issues/46">#46</a>: Support for symbols like ndash and mdash
</h3> </h3>
@ -164,7 +240,7 @@ note that —— is replaced with 2 mdashes and …. becomes ellipsis+. and so o
</p> </p>
</li> </li>
</ul> </ul>
<h3> <h3 id="headline-7">
<span class="todo">DONE</span> <span class="todo">DONE</span>
<a href="https://github.com/chaseadamsio/goorgeous/issues/47">#47:</a> Consecutive <code>code</code> wrapped text gets joined <a href="https://github.com/chaseadamsio/goorgeous/issues/47">#47:</a> Consecutive <code>code</code> wrapped text gets joined
</h3> </h3>
@ -173,7 +249,7 @@ either <code>this</code> or <code>that</code> foo.
either <code>this</code> either <code>this</code>
or <code>that</code> foo. or <code>that</code> foo.
</p> </p>
<h3> <h3 id="headline-8">
<span class="todo">DONE</span> <span class="todo">DONE</span>
<a href="https://github.com/chaseadamsio/goorgeous/issues/50">#50</a>: LineBreaks in lists are preserved <a href="https://github.com/chaseadamsio/goorgeous/issues/50">#50</a>: LineBreaks in lists are preserved
</h3> </h3>
@ -208,7 +284,7 @@ foo
</p> </p>
</li> </li>
</ol> </ol>
<h3> <h3 id="headline-9">
<span class="todo">DONE</span> <span class="todo">DONE</span>
<a href="https://github.com/chaseadamsio/goorgeous/issues/68">#68</a>: Quote block with inline markup <a href="https://github.com/chaseadamsio/goorgeous/issues/68">#68</a>: Quote block with inline markup
</h3> </h3>
@ -217,12 +293,12 @@ foo
<a href="https://www.example.com"><em>this</em> <strong>is</strong> <span style="text-decoration: underline;">markup</span>!</a> <a href="https://www.example.com"><em>this</em> <strong>is</strong> <span style="text-decoration: underline;">markup</span>!</a>
</p> </p>
</blockquote> </blockquote>
<h3> <h3 id="headline-10">
<span class="todo">DONE</span> <span class="todo">DONE</span>
<a href="https://github.com/chaseadamsio/goorgeous/issues/72">#72</a>: Support for #+ATTR_HTML <a href="https://github.com/chaseadamsio/goorgeous/issues/72">#72</a>: Support for #+ATTR_HTML
</h3> </h3>
<img src="https://golang.org/doc/gopher/pkg.png" alt="Go is fine though." title="https://golang.org/doc/gopher/pkg.png" id="gopher-image" width="300" style="border:2px solid black;"/> <img src="https://golang.org/doc/gopher/pkg.png" alt="Go is fine though." title="https://golang.org/doc/gopher/pkg.png" id="gopher-image" width="300" style="border:2px solid black;"/>
<h3> <h3 id="headline-11">
<span class="todo">DONE</span> <span class="todo">DONE</span>
<a href="https://github.com/chaseadamsio/goorgeous/issues/75">#75</a>: Not parsing nested lists correctly <a href="https://github.com/chaseadamsio/goorgeous/issues/75">#75</a>: Not parsing nested lists correctly
</h3> </h3>
@ -240,11 +316,11 @@ sub bullet
</ul> </ul>
</li> </li>
</ul> </ul>
<h3> <h3 id="headline-12">
<span class="todo">DONE</span> <span class="todo">DONE</span>
<a href="https://github.com/chaseadamsio/goorgeous/issues/77">#77</a>: Recognize <code class="verbatim">code</code>— as code plus dash <a href="https://github.com/chaseadamsio/goorgeous/issues/77">#77</a>: Recognize <code class="verbatim">code</code>— as code plus dash
</h3> </h3>
<h3> <h3 id="headline-13">
<span class="todo">DONE</span> <span class="todo">DONE</span>
<a href="https://github.com/chaseadamsio/goorgeous/issues/78">#78</a>: Emphasis at beginning of line <a href="https://github.com/chaseadamsio/goorgeous/issues/78">#78</a>: Emphasis at beginning of line
</h3> </h3>
@ -255,33 +331,33 @@ sub bullet
Text Text
<em>italics</em> <em>italics</em>
</p> </p>
<h3> <h3 id="headline-14">
<span class="todo">DONE</span> <span class="todo">DONE</span>
<a href="https://github.com/chaseadamsio/goorgeous/issues/82">#82</a>: Crash on empty headline <a href="https://github.com/chaseadamsio/goorgeous/issues/82">#82</a>: Crash on empty headline
</h3> </h3>
<h4> <h4 id="headline-15">
</h4> </h4>
<p> <p>
just a space as title… just a space as title…
</p> </p>
<h3> <h3 id="headline-16">
<span class="todo">DONE</span> <span class="todo">DONE</span>
<a href="https://github.com/chaseadamsio/goorgeous/issues/84">#84</a>: Paragraphs that are not followed by an empty line are not parsed correctly <a href="https://github.com/chaseadamsio/goorgeous/issues/84">#84</a>: Paragraphs that are not followed by an empty line are not parsed correctly
</h3> </h3>
<h4> <h4 id="headline-17">
Foo Foo
</h4> </h4>
<p> <p>
Foo paragraph. Foo paragraph.
</p> </p>
<h4> <h4 id="headline-18">
Bar Bar
</h4> </h4>
<p> <p>
Bar paragraph Bar paragraph
</p> </p>
<h3> <h3 id="headline-19">
<span class="todo">DONE</span> <span class="todo">DONE</span>
<a href="https://github.com/chaseadamsio/goorgeous/issues/86">#86</a>: Multiple hyphens not converted to dashes <a href="https://github.com/chaseadamsio/goorgeous/issues/86">#86</a>: Multiple hyphens not converted to dashes
</h3> </h3>
@ -327,17 +403,17 @@ src/example/export blocks should not be converted!
</pre> </pre>
</li> </li>
</ul> </ul>
<h3> <h3 id="headline-20">
<span class="todo">DONE</span> <span class="todo">DONE</span>
<a href="https://github.com/chaseadamsio/goorgeous/issues/87">#87</a>: Markup in footnotes is rendered literally <a href="https://github.com/chaseadamsio/goorgeous/issues/87">#87</a>: Markup in footnotes is rendered literally
</h3> </h3>
<p> <p>
footnotes can contain <strong>markup</strong> - and other elements and stuff <sup class="footnote-reference"><a id="footnote-reference-2" href="#footnote-2">2</a></sup> footnotes can contain <strong>markup</strong> - and other elements and stuff <sup class="footnote-reference"><a id="footnote-reference-2" href="#footnote-2">2</a></sup>
</p> </p>
<h2> <h2 id="headline-21">
issues (wrongly) filed with hugo issues (wrongly) filed with hugo
</h2> </h2>
<h3> <h3 id="headline-22">
<a href="https://github.com/gohugoio/hugo/issues/3874">#3874</a> exporting images in org mode <a href="https://github.com/gohugoio/hugo/issues/3874">#3874</a> exporting images in org mode
</h3> </h3>
<p> <p>
@ -346,7 +422,7 @@ Hello, I&#39;m writing hugo blogs using org-mode.
<p> <p>
When inserting an image link like <img src="/home/amos/Pictures/Screenshots/img-2017-09-11-165647.png" alt="/home/amos/Pictures/Screenshots/img-2017-09-11-165647.png" title="/home/amos/Pictures/Screenshots/img-2017-09-11-165647.png" />, hugo doesn&#39;t export the image. When inserting an image link like <img src="/home/amos/Pictures/Screenshots/img-2017-09-11-165647.png" alt="/home/amos/Pictures/Screenshots/img-2017-09-11-165647.png" title="/home/amos/Pictures/Screenshots/img-2017-09-11-165647.png" />, hugo doesn&#39;t export the image.
</p> </p>
<h3> <h3 id="headline-23">
<a href="https://github.com/gohugoio/hugo/issues/4006">#4006</a> source code blocks in org not rendered correctly <a href="https://github.com/gohugoio/hugo/issues/4006">#4006</a> source code blocks in org not rendered correctly
</h3> </h3>
<div class="highlight"> <div class="highlight">
@ -359,7 +435,7 @@ When inserting an image link like <img src="/home/amos/Pictures/Screenshots/img-
(ansi-term)) (ansi-term))
</pre> </pre>
</div> </div>
<h1> <h1 id="headline-24">
Footnotes Footnotes
</h1> </h1>
<div class="footnotes"> <div class="footnotes">