Support basic #+INCLUDE (src/example/export block only)

including org files is more complex - e.g. footnotes need to be namespaced to
their source file. org does this by prefixing each included files footnotes
with a number - but even that is not enough as it doesn't guarantee
uniqueness.

As I don't have a usecase for it, I'll avoid the additional complexity for
now.
This commit is contained in:
Niklas Fasching 2018-12-14 16:44:28 +01:00
parent 04df30a7b5
commit 2947d7632d
13 changed files with 150 additions and 26 deletions

View file

@ -2,6 +2,3 @@
<h1>Headline with todo status &amp; priority</h1>
<h1>Headline with TODO status</h1>
<h1>Headline with tags &amp; priority</h1>
<p>
this one is cheating a little as tags are ALWAYS printed right aligned to a given column number…
</p>

View file

@ -2,4 +2,4 @@
* TODO [#B] Headline with todo status & priority
* DONE Headline with TODO status
* [#A] Headline with tags & priority :foo:bar:
this one is cheating a little as tags are ALWAYS printed right aligned to a given column number...

View file

@ -15,6 +15,74 @@ or even a <strong>totally</strong> <em>custom</em> kind of block
crazy ain&#39;t it?
</p>
</div>
<h3><a href="https://github.com/chaseadamsio/goorgeous/issues/31">#31</a>: Support #+INCLUDE</h3>
<p>
Note that only src/example/export block inclusion is supported for now.
There&#39;s quite a lot more to include (see the <a href="https://orgmode.org/manual/Include-files.html">org manual for include files</a>) but I
don&#39;t have a use case for this yet and stuff like namespacing footnotes of included files
adds quite a bit of complexity.
</p>
<p>
for now files can be included as:
</p>
<ul>
<li>
<p>
src block
</p>
<div class="highlight">
<pre>
* Simple Headline
* TODO [#B] Headline with todo status &amp; priority
* DONE Headline with TODO status
* [#A] Headline with tags &amp; priority :foo:bar:
</pre>
</div>
</li>
<li>
<p>
export block
</p>
<p>
Paragraphs are the default element.
</p>
<p>
Empty lines and other elements end paragraphs - but paragraphs
can
obviously
span
multiple
lines.
</p>
<p>
Paragraphs can contain inline markup like <em>emphasis</em> <strong>strong</strong> and links <a href="https://www.example.com">example.com</a> and stuff.
</p>
</li>
<li>
<p>
example block
</p>
<pre class="example">
language: go
script:
- make test
- make generate-gh-pages
deploy:
provider: pages
github-token: $GITHUB_TOKEN # From travis-ci.org repository settings
local-dir: gh-pages
target-branch: gh-pages
skip-cleanup: true
verbose: true
on:
branch: master
</pre>
</li>
</ul>
<h3><a href="https://github.com/chaseadamsio/goorgeous/issues/33">#33</a>: Wrong output when mixing html with org-mode</h3>
<div class="outline-2" id="meta" style="color: green;">
<table>

13
org/testdata/misc.org vendored
View file

@ -12,6 +12,19 @@ verse
or even a *totally* /custom/ kind of block
crazy ain't it?
#+END_CUSTOM
*** 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: "../../.travis.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 |