#+RESULTS:
: some results without a block
#+CAPTION: block caption
#+BEGIN_SRC bash :results raw
echo "a bash source block"
function hello {
echo Hello World!
}
hello
#+END_SRC
#+BEGIN_SRC
a source block with leading newline, trailing newline characters
and a line started
with leading space
and line leading tab.
#+END_SRC
#+BEGIN_SRC
a source block without a language
#+END_SRC
#+BEGIN_SRC bash
echo a source block with results
#+END_SRC
#+RESULTS:
: a source block with results
#+BEGIN_SRC bash :exports none
echo a source block with results that is not exported
#+END_SRC
#+RESULTS:
: a source block with results that is not exported
#+BEGIN_SRC bash :exports results
echo a source block that only exports results
#+END_SRC
#+RESULTS:
: a source block that only exports results
#+begin_src bash :cmdline -foo -bar :exports results
# the code block is not rendered
echo but the result block is
#+end_src
#+RESULTS:
: but the result block is
#+BEGIN_EXAMPLE foo bar baz
an example block with
multiple lines including
empty lines!
it also has multiple parameters
src, example & export blocks treat their content as raw text
/inline/ *markup* is ignored
and whitespace is honored and not removed
content of example blocks is still html escaped - see <script>alert("escaped")</script>
#+END_EXAMPLE
: examples like this
: are also supported
:
: note that /inline/ *markup* ignored
#+BEGIN_QUOTE
Mongodb is *webscale*. (source: [[http://www.mongodb-is-web-scale.com/][mongodb-is-web-scale]])
blocks like the quote block parse their content and can contain
- lists
- inline /markup/
- tables
| foo |
| bar |
| baz |
- paragraphs
- ...
whitespace is honored and not removed (but is not displayed because that's how html works by default)
it can be made visible using css (e.g. =white-space: pre=).
#+END_QUOTE
#+BEGIN_SRC org
,#+BEGIN_SRC bash
echo src (with language org) and example blocks support escaping using commata
,#+END_SRC
,,* I am not a real headline - commata escape characters aren't renderered
#+END_SRC
#+BEGIN_EXAMPLE
,#+BEGIN_SRC bash
echo src (with language org) and example blocks support escaping using commata
,#+END_SRC
,,* I am not a real headline - commata escape characters aren't renderered
#+END_EXAMPLE
#+BEGIN_EXPORT html
<script>
console.log("Hello World!")
</script>
#+END_EXPORT
#+BEGIN_EXPORT something-other-than-html
I won't be rendered as html
#+END_EXPORT
- list item 1
blocks can contain unindented lines that would normally end a list item
#+BEGIN_EXAMPLE
this line is not indented - if it was outside of a block the list item would end
#+END_EXAMPLE
#+BEGIN_QUOTE
this line is not indented - if it was outside of a block the list item would end
#+END_QUOTE
now we're outside the block again and the following unindented line will be outside of the list item
this unindented line is outside of the list item
- list item 2
#+BEGIN_SRC
#+BEGIN_EXAMPLE
#+END_SRC
#+END_EXAMPLE
#+BEGIN_QUOTE
#+BEGIN_EXAMPLE
#+END_QUOTE
#+END_EXAMPLE
#+END_QUOTE
- verse blocks
- emacs / ox-hugo rendering
#+BEGIN_EXPORT html
<p class="verse">
Great clouds overhead<br />
Tiny black birds rise and fall<br />
Snow covers Emacs<br />
<br />
---AlexSchroeder<br />
</p>
#+END_EXPORT
- go-org rendering
#+BEGIN_SRC html
<style>
.verse-block p { white-space: pre; }
.verse-block p + p { margin: 0; }
</style>
#+END_SRC
#+BEGIN_EXPORT html
<style>
.verse-block p { white-space: pre; }
.verse-block p + p { margin: 0; }
</style>
#+END_EXPORT
#+BEGIN_VERSE
Great clouds overhead
Tiny black birds rise and fall
Snow covers Emacs
---AlexSchroeder
#+END_VERSE
#+BEGIN_SRC raku :results output :noweb strip-export :exports both
<<defn>>describe <a b c>;
#+END_SRC
some results without a block
echo "a bash source block"
function hello {
echo Hello World!
}
hello
a source block with leading newline, trailing newline characters
and a line started
with leading space
and line leading tab.
a source block without a language
echo a source block with results
a source block with results
a source block that only exports results
but the result block is
an example block with
multiple lines including
empty lines!
it also has multiple parameters
src, example & export blocks treat their content as raw text
/inline/ *markup* is ignored
and whitespace is honored and not removed
content of example blocks is still html escaped - see <script>alert("escaped")</script>
examples like this are also supported note that /inline/ *markup* ignored
Mongodb is webscale. (source: mongodb-is-web-scale)
blocks like the quote block parse their content and can contain
- lists
- inline markup
tables
foo bar baz - paragraphs
- … whitespace is honored and not removed (but is not displayed because that's how html works by default) it can be made visible using css (e.g.
white-space: pre).
#+BEGIN_SRC bash
echo src (with language org) and example blocks support escaping using commata
#+END_SRC
,* I am not a real headline - commata escape characters aren't renderered
#+BEGIN_SRC bash echo src (with language org) and example blocks support escaping using commata #+END_SRC ,* I am not a real headline - commata escape characters aren't renderered
list item 1 blocks can contain unindented lines that would normally end a list item
this line is not indented - if it was outside of a block the list item would end
this line is not indented - if it was outside of a block the list item would end
now we're outside the block again and the following unindented line will be outside of the list item
this unindented line is outside of the list item
list item 2
#+BEGIN_EXAMPLE
#+END_EXAMPLE
#+END_QUOTE
verse blocks
emacs / ox-hugo rendering
Great clouds overhead
Tiny black birds rise and fall
Snow covers Emacs
---AlexSchroeder
go-org rendering
<style>
.verse-block p { white-space: pre; }
.verse-block p + p { margin: 0; }
</style>
Great clouds overhead Tiny black birds rise and fall Snow covers Emacs
—AlexSchroeder
describe <a b c>;
Anything can be captioned. #+CAPTION: captioned soure block #+BEGIN_SRC sh echo "i have a caption!" #+END_SRC #+CAPTION: captioned link (image in this case) [[https://placekitten.com/200/200#.png]] note that the whole paragraph is captioned, so a linebreak is needed for images to caption correctly #+CAPTION: captioned link (image in this case) [[https://placekitten.com/200/200#.png]] see?
Anything can be captioned.
echo "i have a caption!"

note that the whole paragraph is captioned, so a linebreak is needed for images to caption correctly
see?
#+OPTIONS: ealb:t Line breaks between multi-byte characters are omitted when the =ealb= option is set: - 中午 吃啥 - something else 中午 吃啥 something else
Line breaks between multi-byte characters are omitted when the ealb option is set:
* Using some footnotes
- normal footnote reference [fn:1] [fn:6] [fn:foo-bar] (footnote names can be anything in the format =[\w-]=)
- further references to the same footnote should not [fn:1] render duplicates in the footnote list
- inline footnotes are also supported via [fn:2:the inline footnote definition].
- anonymous inline footnotes are also supported via [fn::the anonymous inline footnote definition].
- Footnote definitions are not printed where they appear.
Rather, they are gathered and exported at the end of the document in the footnote section. [fn:4]
- footnotes that reference a non-existant definition are rendered but log a warning [fn:does-not-exist]
[fn:4] so this definition will not be at the end of this section in the exported document.
Rather, it will be somewhere down below in the footnotes section.
[fn:5] this definition will also not be exported here - not only that, it will be overwritten by a definition
of the same name later on in the document. That will log a warning but carry on nonetheless.
* Footnotes
Please note that the footnotes section is not automatically excluded from the export like in emacs. [fn:7]
[fn:foo-bar] yolo
[fn:1] https://www.example.com
- footnotes can contain *markup*
- and other elements
- like blocks
#+BEGIN_SRC
other non-plain
#+END_SRC
- and tables
| 1 | a |
| 2 | b |
| 3 | c |
[fn:3] [[http://example.com/unused-footnote][example.com/unused-footnote]]
[fn:5] another unused footnote (this definition overwrites the previous definition of =fn:5=)
[fn:6]
Footnotes break after two consecutive empty lines - just like paragraphs - see https://orgmode.org/worg/dev/org-syntax.html.
This shouldn't happen when the definition line and the line after that are empty.
[fn:7]
There's multiple reasons for that. Among others, doing so requires i18n (to recognize the section) and silently
hides content before and after the footnotes[fn:8].
this is not part of [fn:7] anymore as there are 2 blank lines in between!
[fn:8] Footnotes can be linked from another footnote's definition.
[\w-])and other elements
like blocks
other non-plain
and tables
| 1 | a |
| 2 | b |
| 3 | c |
Footnotes break after two consecutive empty lines - just like paragraphs - see https://orgmode.org/worg/dev/org-syntax.html. This shouldn't happen when the definition line and the line after that are empty.
yolo
the inline footnote definition
the anonymous inline footnote definition
so this definition will not be at the end of this section in the exported document. Rather, it will be somewhere down below in the footnotes section.
There's multiple reasons for that. Among others, doing so requires i18n (to recognize the section) and silently hides content before and after the footnotes9.
Footnotes can be linked from another footnote's definition.
* Title [fn:1] [fn:1] this test file just exists to reproduce a bug with footnotes in headlines - that only happens in very specific circumstances. The TLDR is: - HTMLWriter.footnotes should be a pointer field. I didn't notice my error as go translated my pointer-method calls on non-pointer values rather than complaining - i.e. =footnotes.add()= transparently gets translated to =(&footnotes).add()= ([[https://golang.org/ref/spec#Calls][docs]]). - Headlines have to be htmlified twice - once for the outline and once for the headline itself. To do so we have to copy the writer - Copying the writer copies footnotes - which contains a map and a slice. Changes to the map will always be reflected in the original map. Changes to the slice will only be reflected if the slice doesn't grow. - We can thus end up with a footnote being in the mapping but not the slice - and get an index out of range error.
this test file just exists to reproduce a bug with footnotes in headlines - that only happens in very specific circumstances. The TLDR is:
footnotes.add() transparently gets translated to (&footnotes).add() (docs).#+SETUPFILE: setup_file_org #+OPTIONS: toc:1 * Simple Headline [1/2] - [X] checked - [ ] unchecked - note that statistic tokens are marked up anywhere not just where they are actually meant to be - even here > [100%] < (Org mode proper does the same) * TODO [#B] Headline with todo status & priority * DONE Headline with TODO status :PROPERTIES: :custom_id: this-will-be-the-id-of-the-headline :note: property drawers are not exported as html like other drawers :END: we can link to headlines that define a custom_id: [[#this-will-be-the-id-of-the-headline]] * [#A] Headline with tags & priority :foo:bar: Still outside the drawer :DRAWERNAME: This is inside the drawer :end: Still outside the drawer * CUSTOM headline with custom status it's possible to use =#+SETUPFILE= - in this case the setup file contains the following #+INCLUDE: "setup_file_org" src org * excluded headline :custom_noexport: this headline and it's content are not exported as it is marked with an =EXCLUDE_TAGS= tag. By default =EXCLUDE_TAGS= is just =:noexport:=. * TODO [#A] COMMENT commented headline this headline is commented out. see [[https://orgmode.org/manual/Comment-Lines.html][comment lines]] * malformed property drawer :PROPERTIES: not a property :END: * level limit for headlines to be included in the table of contents The toc option allows setting a [[https://orgmode.org/manual/Export-settings.html][level limit]]. For this file we set it to 1 - which means that the following headlines won't be included in the table of contents. ** headline 2 not in toc *** headline 3 not in toc ** anoter headline 2 not in toc you get the gist...
[1/2]
[100%] <
(Org mode proper does the same)we can link to headlines that define a custom_id: #this-will-be-the-id-of-the-headline
Still outside the drawer
This is inside the drawer
Still outside the drawer
it's possible to use #+SETUPFILE - in this case the setup file contains the following
#+TODO: TODO DONE CUSTOM
#+EXCLUDE_TAGS: noexport custom_noexport
:PROPERTIES: not a property
:END:
The toc option allows setting a level limit. For this file we set it to 1 - which means that the following headlines won't be included in the table of contents.
you get the gist…
Lines in a source block can be highlighted with =:hl_lines=. #+begin_src emacs-lisp :hl_lines 3-4 (+ 1 2) (+ 1 2) (+ 1 2) (+ 1 2) (+ 1 2) #+end_src
Lines in a source block can be highlighted with :hl_lines.
(+ 1 2)
(+ 1 2)
(+ 1 2)
(+ 1 2)
(+ 1 2)
- /emphasis/ and a hard line break \\
see? \\
also hard line breaks not followed by a newline get ignored, see \\
- /.emphasis with dot border chars./
- /emphasis with a slash/inside/
- /emphasis/ followed by raw text with slash /
- *emphasis ending with a "difficult" multibyte character 习*
- emphasis just before =explict line break=\\
=plus more emphasis=
- ->/not an emphasis/<-
- links with slashes do not become /emphasis/: [[https://somelinkshouldntrenderaccidentalemphasis.com]]/ /emphasis/
- _underlined_ *bold* =verbatim= ~code~ +strikethrough+
- *bold string with an *asterisk inside*
- inline source blocks like src_html[:eval no]{<h1>hello</h1>} and this src_schema[:eval no]{world}
- inline export blocks @@html:<h1>hello</h1>@@
- =multiline emphasis is
supported - and respects MaxEmphasisNewLines (default: 1)=
/so this
is emphasized/
/but
this
is
not emphasized/
- empty emphasis markers like ++ // __ and so on are ignored
- use _{} for subscript_{sub} and ^{} for superscript^{super}
- links
1. regular link [[https://example.com]] link without description
2. regular link [[https://example.com][example.com]] link with description
3. regular link to a file (image) [[file:my-img.png]]
4. regular link to an org file (extension replaced with html) [[file:inline.org]] / [[../testdata/inline.org]]
5. regular link to a file (video) [[my-video.mp4]]
6. regular link to http (image) [[http://placekitten.com/200/200#.png]]
7. regular link to https (image) [[https://placekitten.com/200/200#.png]]
8. regular link with image as description [[https://placekitten.com][https://placekitten.com/200/200#.png]]
9. regular link enclosed in [] [[[https://www.example.com]]] [[[https://www.example.com][example.com]]]
10. auto link, i.e. not inside =\[[square brackets]\]= https://www.example.com
- timestamps
- <2019-01-06>
- <2019-01-06 Sun>
- <2019-01-06 Sun 18:00>
- <2019-01-06 Sun 18:00 +1w>
- <2019-01-06 18:00>
- <2019-01-06 18:00 +1w>
- =#+LINK= based links:
#+LINK: example https://www.example.com/
#+LINK: example_interpolate_s https://www.example.com?raw_tag=%s
#+LINK: example_interpolate_h https://www.example.com?encoded_tag=%h
- [[example:foobar]]
- [[example:]]
- [[example]]
- [[example][description]]
- [[example_interpolate_s:tag value with specical chars % : &]] (w/o tag [[example_interpolate_s]])
- [[example_interpolate_h:tag value with specical chars % : &]] (w/o tag [[example_interpolate_h]])
- =#+MACROs=: {{{headline(yolo)}}}
#+MACRO: headline @@html:<h1>$1</h1>@@
- =#+MACROs=: {{{macroWithSpaces(red, blue)}}}
#+MACRO: macroWithSpaces roses are $1, violets are $2
- org entities
- =\pi= & =\pi{}= => \pi & \pi{}
- =\angle{}= & =\angle= & =\ang= =>= \angle{} \angle \ang
explict line breakplus more emphasisverbatim code <h1>hello</h1>
world
multiline emphasis is
supported - and respects MaxEmphasisNewLines (default: 1)
so this
is emphasized
/but
this
is
not emphasized/links




\[[square brackets]\] https://www.example.comtimestamps
#+LINK based links:
#+MACROs:
#+MACROs:
roses are red, violets are blue
org entities
\pi & \pi{} => π & π\angle{} & \angle & \ang > ∠ ∠ ∠#+OPTIONS: toc:nil * captions, custom attributes and more #+CAPTION: and _multiple_ #+CAPTION: lines of *captions*! #+ATTR_HTML: :class a b #+ATTR_HTML: :id it :class c d #+BEGIN_SRC sh echo "a bash source block with custom html attributes" #+END_SRC and an image with custom html attributes and a caption #+CAPTION: kittens! #+ATTR_HTML: :style height: 100%; :id overwritten #+ATTR_HTML: :style border: 10px solid black; :id kittens [[https://placekitten.com/200/200#.png]] #+NAME: foo named paragraph #+NAME: bar #+begin_src named block #+end_src # comments must have whitespace after the hashtag #not a comment because there's no space after the hashtag * table of contents A table of contents can be rendered anywhere in the document by using #+begin_src org ,#+TOC: headlines $n #+end_src Where =$n= is the max headline lvl that will be included. You can use =headlines 0= to include all headlines. #+TOC: headlines 0
echo "a bash source block with custom html attributes"
and an image with custom html attributes and a caption
named paragraph
named block
#not a comment because there's no space after the hashtag
A table of contents can be rendered anywhere in the document by using
#+TOC: headlines $n
Where $n is the max headline lvl that will be included. You can use headlines 0 to include all headlines.
without latex delimiters the =_{i=1}= in =\sum_{i=1}^n a_n= is interpreted as subscript.
we support =\(...\)=, =\[...\]=, =$$...$$= and =\begin{$env}...\end{$env}= as latex fragment delimiters.
- \sum_{i=1}^n a_n (without latex delimiter)
- \(\sum_{i=1}^n a_n\)
- \[\sum_{i=1}^n a_n\]
- $$\sum_{i=1}^n a_n$$
- \begin{xyz}\sum_{i=1}^n a_n\end{xyz}
- \begin{xyz}
\sum_{i=1}^n a_n
\end{xyz}
- $2 + 2$, $3 - 3$
- \begin{xyz}
latex block ignores block lvl elements (e.g. list - line starting with -)
a = b
- c
- d
\end{xyz}
without latex delimiters the _{i=1} in \sum_{i=1}^n a_n is interpreted as subscript.
we support \(...\), \[...\], $$...$$ and \begin{$env}...\end{$env} as latex fragment delimiters.
- [ ] unordered list item 1
-
list item with empty first and second line \\
normally an empty line breaks the list item - but we make an exception for the first line and don't count it towards that limit
- unordered list item 2 - with ~inline~ /markup/
1. [-] ordered sublist item 1
a) [X] ordered sublist item 1
b) [ ] ordered sublist item 2
c) [X] ordered sublist item 3
2. ordered sublist item 2
3.
list item with empty first and second line - see above
- [X] unordered list item 3 - and a [[https://example.com][link]]
and some lines of text
1. and another subitem
#+BEGIN_SRC sh
echo with a block
#+END_SRC
2. and another one with a table
| a | b | c |
|---+---+---|
| 1 | 2 | 3 |
and text with an empty line in between as well!
- unordered list item 4
: with an example
:
: that spans multiple lines
descriptive lists
- [ ] term :: details
continued details
- [ ] details without a term
- [X] term ::
details on a new line
- term ::
details on a new line (with an empty line in between)
*continued*
#+BEGIN_SRC bash
echo "Hello World!"
#+END_SRC
some list termination tests
- unordered 1
- unordered 2
1. ordered 1
2. ordered 2
1. ordered 1
2. ordered 2
- unordered 1
- unordered 2
1. ordered 1
2. ordered 2
- unordered descriptive :: 1
- unordered descriptive :: 2
1. ordered descriptive :: 1
2. ordered descriptive :: 2
- unordered 1
- unordered 2
1. [@2] use `[@n]` to change the value of list items
2. [ ] foobar
3. [@10] [X] that even works in combination with list statuses (`[ ]`)
unordered list item 2 - with inline markup
ordered sublist item 1
unordered list item 3 - and a link and some lines of text
and another subitem
echo with a block
and another one with a table
| a | b | c |
|---|---|---|
| 1 | 2 | 3 |
and text with an empty line in between as well!
unordered list item 4
with an example that spans multiple lines
descriptive lists
details on a new line (with an empty line in between) continued
echo "Hello World!"
some list termination tests
#+TITLE: Misc title @@html:<b>with an inline html export</b>@@
** issues from goorgeous (free test cases, yay!)
*** DONE [[https://github.com/chaseadamsio/goorgeous/issues/19][#19]]: Support #+HTML
#+HTML: <p style="border: 1px dotted grey">neato!</p>
*** DONE [[https://github.com/chaseadamsio/goorgeous/issues/29][#29:]] Support verse block
#+BEGIN_VERSE
This
*is*
verse
#+END_VERSE
#+BEGIN_CUSTOM
or even a *totally* /custom/ kind of block
crazy ain't it?
#+END_CUSTOM
*** DONE [[https://github.com/chaseadamsio/goorgeous/issues/30][#30]]: Support #+SETUPFILE
see =./headlines.org=
*** DONE [[https://github.com/chaseadamsio/goorgeous/issues/31][#31]]: Support #+INCLUDE
Note that only src/example/export block inclusion is supported for now.
There's quite a lot more to include (see the [[https://orgmode.org/manual/Include-files.html][org manual for include files]]) but I
don't have a use case for this yet and stuff like namespacing footnotes of included files
adds quite a bit of complexity.
for now files can be included as:
- src block
#+INCLUDE: "./headlines.org" src org
- export block
#+INCLUDE: "./paragraphs.html" export html
- example block
#+INCLUDE: "../../.github/workflows/ci.yml" example yaml
*** DONE [[https://github.com/chaseadamsio/goorgeous/issues/33][#33]]: Wrong output when mixing html with Org mode
#+HTML: <div class="outline-2" id="meta" style="color: green;">
| *foo* | foo |
| *bar* | bar |
#+HTML: </div>
*** DONE [[https://github.com/chaseadamsio/goorgeous/issues/41][#41]]: Support Table Of Contents
*** DONE [[https://github.com/chaseadamsio/goorgeous/issues/46][#46]]: Support for symbols like ndash and mdash
- ndash --
- mdash ---
- ellipsis ...
- acute \Aacute and so on
- note that ------ is replaced with 2 mdashes and .... becomes ellipsis+. and so on - that's how org also does it
*** DONE [[https://github.com/chaseadamsio/goorgeous/issues/47][#47:]] Consecutive ~code~ wrapped text gets joined
either ~this~ or ~that~ foo.
either ~this~
or ~that~ foo.
*** DONE [[https://github.com/chaseadamsio/goorgeous/issues/50][#50]]: LineBreaks in lists are preserved
- this list item
has
multiple
linbreaks - but it's still just one paragraph (i.e. no line breaks are rendered)
- foobar
1. same
goes
for
ordered
lists
2. foo
*** DONE [[https://github.com/chaseadamsio/goorgeous/issues/68][#68]]: Quote block with inline markup
#+BEGIN_QUOTE
[[https://www.example.com][/this/ *is* _markup_!]]
#+END_QUOTE
*** DONE [[https://github.com/chaseadamsio/goorgeous/issues/72][#72]]: Support for #+ATTR_HTML
#+ATTR_HTML: :alt Go is fine though. :id gopher-image
#+ATTR_HTML: :width 300 :style border:2px solid black;
[[https://golang.org/doc/gopher/pkg.png]]
*** DONE [[https://github.com/chaseadamsio/goorgeous/issues/75][#75]]: Not parsing nested lists correctly
- bullet 1
- sub bullet
*** DONE [[https://github.com/chaseadamsio/goorgeous/issues/77][#77]]: Recognize =code=--- as code plus dash
*** DONE [[https://github.com/chaseadamsio/goorgeous/issues/78][#78]]: Emphasis at beginning of line
/italics/
Text
/italics/
*** DONE [[https://github.com/chaseadamsio/goorgeous/issues/82][#82]]: Crash on empty headline
****
just a space as title...
*** DONE [[https://github.com/chaseadamsio/goorgeous/issues/84][#84]]: Paragraphs that are not followed by an empty line are not parsed correctly
**** Foo
Foo paragraph.
**** Bar
Bar paragraph
*** DONE [[https://github.com/chaseadamsio/goorgeous/issues/86][#86]]: Multiple hyphens not converted to dashes
just like #46
- =--= -> -- (en dash)
- =---= -> --- (em dash)
also, consecutive dashes inside
- inline code =--= =---= and verbatim ~--~ ~---~
- src/example/export blocks should not be converted!
#+BEGIN_SRC sh
--, ---
#+END_SRC
#+BEGIN_EXAMPLE
--, ---
#+END_EXAMPLE
#+BEGIN_EXPORT html
--, ---
#+END_EXPORT
: --, ---
*** DONE [[https://github.com/chaseadamsio/goorgeous/issues/87][#87]]: Markup in footnotes is rendered literally
footnotes can contain *markup* - and other elements and stuff [fn:1] [fn:2:that also goes for *inline* footnote /definitions/]
*** DONE [[https://github.com/chaseadamsio/goorgeous/issues/92][#92]]: src blocks only render in caps
The behaviour of Org mode =<s TAB= changed and it now inserts lowercased src blocks (go-org already handled this one)
- lowercased:
#+begin_src bash
uname -a
#+end_src
- uppercased
#+BEGIN_SRC bash
uname -a
#+END_SRC
** issues (wrongly) filed with hugo
*** [[https://github.com/gohugoio/hugo/issues/3874][#3874]] exporting images in org mode
Hello, I'm writing hugo blogs using org-mode.
When inserting an image link like [[/home/amos/Pictures/Screenshots/img-2017-09-11-165647.png]], hugo doesn't export the image.
*** [[https://github.com/gohugoio/hugo/issues/4006][#4006]] source code blocks in org not rendered correctly
#+BEGIN_SRC emacs-lisp
(defun small-shell ()
(interactive)
(split-window-vertically)
(other-window 1)
(shrink-window (- (window-height) 12))
(ansi-term))
#+END_SRC
** misc fuzz / regression / edge case
*** index out of range in headline priority parsing
**** [#B
*** index out of range in explicit line break parsing
0\\
*** list items don't end on child headline
- a list item
**** followed by a child headline
- followed by another list item
* Footnotes
[fn:1] a footnote /with/ *markup*
- and a *list*
- because that's possible
neato!
This is verse
or even a totally custom kind of block crazy ain't it?
see ./headlines.org
Note that only src/example/export block inclusion is supported for now. There's quite a lot more to include (see the org manual for include files) but I don't have a use case for this yet and stuff like namespacing footnotes of included files adds quite a bit of complexity.
for now files can be included as:
src block
#+SETUPFILE: setup_file_org
#+OPTIONS: toc:1
* Simple Headline [1/2]
- [X] checked
- [ ] unchecked
- note that statistic tokens are marked up anywhere
not just where they are actually meant to be - even here > [100%] <
(Org mode proper does the same)
* TODO [#B] Headline with todo status & priority
* DONE Headline with TODO status
:PROPERTIES:
:custom_id: this-will-be-the-id-of-the-headline
:note: property drawers are not exported as html like other drawers
:END:
we can link to headlines that define a custom_id: [[#this-will-be-the-id-of-the-headline]]
* [#A] Headline with tags & priority :foo:bar:
Still outside the drawer
:DRAWERNAME:
This is inside the drawer
:end:
Still outside the drawer
* CUSTOM headline with custom status
it's possible to use =#+SETUPFILE= - in this case the setup file contains the following
#+INCLUDE: "setup_file_org" src org
* excluded headline :custom_noexport:
this headline and it's content are not exported as it is marked with an =EXCLUDE_TAGS= tag.
By default =EXCLUDE_TAGS= is just =:noexport:=.
* TODO [#A] COMMENT commented headline
this headline is commented out. see [[https://orgmode.org/manual/Comment-Lines.html][comment lines]]
* malformed property drawer
:PROPERTIES:
not a property
:END:
* level limit for headlines to be included in the table of contents
The toc option allows setting a [[https://orgmode.org/manual/Export-settings.html][level limit]]. For this file we set it to 1 - which means that the following headlines
won't be included in the table of contents.
** headline 2 not in toc
*** headline 3 not in toc
** anoter headline 2 not in toc
you get the gist...
export block
Paragraphs are the default element.
Empty lines and other elements end paragraphs - but paragraphs can obviously span multiple lines.
Paragraphs can contain inline markup like emphasis strong and links example.com and stuff.
example block
name: CI
on:
push:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: git
run: |
git clone --depth 1 "https://x-access-token:${{secrets.GITHUB_TOKEN}}@github.com/${GITHUB_REPOSITORY}" .
git config user.name "GitHub Action"
git config user.email "action@github.com"
git log -1 --format="%H"
- name: go
run: sudo snap install go --classic
- name: test
run: make test
- name: gh-pages
run: |
git checkout --orphan gh-pages && git reset
make generate-gh-pages
git add -f docs/ && git commit -m deploy
git push -f origin gh-pages
- name: notify
if: ${{ failure() }}
run: |
text="https://github.com/${GITHUB_REPOSITORY}/actions/runs/${GITHUB_RUN_ID} failed"
curl --silent --output /dev/null ${{secrets.TELEGRAM_URL}} -d "chat_id=${{secrets.TELEGRAM_CHAT_ID}}&text=${text}"
| foo | foo |
| bar | bar |
code wrapped text gets joined
either this or that foo.
either this
or that foo.
bullet 1
code— as code plus dash
italics
Text italics
just a space as title…
Foo paragraph.
Bar paragraph
just like #46
-- -> – (en dash)--- -> — (em dash)also, consecutive dashes inside
-- --- and verbatim -- ---src/example/export blocks should not be converted!
--, ---
--, -----, ---
--, ---
The behaviour of Org mode <s TAB changed and it now inserts lowercased src blocks (go-org already handled this one)
lowercased:
uname -a
uppercased
uname -a
Hello, I'm writing hugo blogs using org-mode.
When inserting an image link like
, hugo doesn't export the image.
(defun small-shell ()
(interactive)
(split-window-vertically)
(other-window 1)
(shrink-window (- (window-height) 12))
(ansi-term))
0\\
#+OPTIONS: toc:nil f:nil e:nil * DONE [#A] =#+OPTIONS:= toggles supported by =go-org= :tag1:tag2: =go-org= supports multiple export toggles as described in the [[https://orgmode.org/manual/Export-settings.html][export settings]] section of the Org mode manual. By default (most of?) those toggles are enabled. This file starts with =#+OPTIONS: toc:nil f:nil e:nil= and thus disables the table of contents, footnotes & entities. That means, entities like =---= --- (mdash) will be left untouched, footnotes like =[fn:1]= [fn:1] will not be exported and there won't be a table of contents at the top. As buffer options are merged with the defaults, the above headline will be exported *with* priority, todo status & tags. | key | description | |------+------------------------------------------------------------------------------------| | f | Include footnotes (definitions & links) | | e | Include entities | | toc | Include table of contents (outline) | |------+------------------------------------------------------------------------------------| | pri | Include priority =[#A]=, =[#B]=, =[#C]= in headline title | | todo | Include todo status in headline title | | tags | Include tags in headline title | |------+------------------------------------------------------------------------------------| | ealb | Omit newlines between multi-byte characters (east asian line breaks, non-standard) | [fn:1] This footnote definition won't be printed
#+OPTIONS: toggles supported by go-org
go-org supports multiple export toggles as described in the export settings section of the Org mode manual.
By default (most of?) those toggles are enabled. This file starts with #+OPTIONS: toc:nil f:nil e:nil and thus
disables the table of contents, footnotes & entities.
That means, entities like --- --- (mdash) will be left untouched, footnotes like [fn:1] will
not be exported and there won't be a table of contents at the top.
As buffer options are merged with the defaults, the above headline will be exported with priority, todo status & tags.
| key | description |
|---|---|
| f | Include footnotes (definitions & links) |
| e | Include entities |
| toc | Include table of contents (outline) |
| pri | Include priority [#A], [#B], [#C] in headline title |
| todo | Include todo status in headline title |
| tags | Include tags in headline title |
| ealb | Omit newlines between multi-byte characters (east asian line breaks, non-standard) |
Paragraphs are the default element. Empty lines and other elements end paragraphs - but paragraphs can obviously span multiple lines. Paragraphs can contain inline markup like /emphasis/ *strong* and links [[https://www.example.com][example.com]] and stuff.
Paragraphs are the default element.
Empty lines and other elements end paragraphs - but paragraphs can obviously span multiple lines.
Paragraphs can contain inline markup like emphasis strong and links example.com and stuff.
#+CAPTION: table with separator before and after header |---+---+---| | a | b | c | |---+---+---| | 1 | 2 | 3 | #+CAPTION: table with separator after header | a | b | c | |---+---+---| | 1 | 2 | 3 | #+CAPTION: table with unicode characters | Character | Org | Rendered HTML | |-----------+-----------+---------------| | Hyphen | =a - b= | a - b | | Ndash | =a -- b= | a – b | | Mdash | =a --- b= | a — b | | Ellipsis | =a ... b= | a … b | #+CAPTION: table without header (but separator before) |---+---+---| | 1 | 2 | 3 | #+CAPTION: table without header | 1 | 2 | 3 | #+CAPTION: table with aligned and sized columns | left aligned | right aligned | center aligned | |--------------+---------------+----------------| | <l> | <r> | <c5> | | | <1> | | | 42 | 42 | 42 | | foobar | foobar | foobar | #+CAPTION: table with right aligned columns (because numbers) | long column a | long column b | long column c | |---------------+---------------+---------------| | 1 | 2 | 3 | #+CAPTION: table with multiple separators (~ multiple tbodies) | a | b | c | |---+---+---| | 1 | 2 | 3 | | . | . | . | |---+---+---| | 1 | 2 | 3 | |---+---+---| | 1 | 2 | 3 |
| a | b | c |
|---|---|---|
| 1 | 2 | 3 |
| a | b | c |
|---|---|---|
| 1 | 2 | 3 |
| Character | Org | Rendered HTML |
|---|---|---|
| Hyphen | a - b |
a - b |
| Ndash | a -- b |
a – b |
| Mdash | a --- b |
a — b |
| Ellipsis | a ... b |
a … b |
| 1 | 2 | 3 |
| 1 | 2 | 3 |
| left aligned | right aligned | center aligned |
|---|---|---|
| 42 | 42 | 42 |
| foobar | foobar | foobar |
| long column a | long column b | long column c |
|---|---|---|
| 1 | 2 | 3 |
| a | b | c |
|---|---|---|
| 1 | 2 | 3 |
| . | . | . |
| 1 | 2 | 3 |
| 1 | 2 | 3 |