Skip to content

Commit 4846967

Browse files
committed
Add docs
1 parent e8aa303 commit 4846967

File tree

6 files changed

+39
-0
lines changed

6 files changed

+39
-0
lines changed

docs/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
```{include} ../README.md
2+
```

docs/images/lorem

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
2+
Duis pretium rutrum dignissim.
3+
Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas.
4+
Interdum et malesuada fames ac ante ipsum primis in faucibus.
5+
Ut iaculis arcu sed dui ornare pretium.
39.4 KB
Binary file not shown.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
~~~ {include=lorem startFrom=2 endAt=3}
2+
~~~
3+

docs/index.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
Welcome to pandoc-codeblock-include's documentation!
2+
====================================================
3+
4+
.. toctree::
5+
:maxdepth: 2
6+
:caption: Contents
7+
8+
Installation <README>
9+
Usage <usage>
10+

docs/usage.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
Usage
2+
=====
3+
4+
Explanation
5+
-----------
6+
7+
In the attributes of a `CodeBlock` element, you can specify an file to be included and the start and end lines using attributes:
8+
* `include` for the path of the included file
9+
* `startFrom` for the first line to include
10+
* `endAt` for the last line to include
11+
12+
Example
13+
-------
14+
15+
Demonstration: Using [pandoc-codeblock-include-sample.txt] as input gives output file in [pdf] (use [lorem] content).
16+
17+
[pandoc-codeblock-include-sample.txt]: https://raw.githubusercontent.com/wiki/chdemko/pandoc-codeblock-include/images/pandoc-codeblock-include-sample.txt
18+
[lorem]: https://raw.githubusercontent.com/wiki/chdemko/pandoc-codeblock-include/images/lorem
19+
[pdf]: https://raw.githubusercontent.com/wiki/chdemko/pandoc-codeblock-include/images/pandoc-codeblock-include-sample.pdf

0 commit comments

Comments
 (0)