You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: README.md
+26-6
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,19 @@
1
+
*[markdown-include](#markdown-include)
2
+
*[Compile your markdown files](#compile-your-markdown-files)
3
+
*[Make a table of contents](#make-a-table-of-contents)
4
+
*[How To Install](#how-to-install)
5
+
*[How To Use](#how-to-use)
6
+
*[markdown.json](#markdown.json)
7
+
*[How It Works](#how-it-works)
8
+
9
+
1
10
# markdown-include
2
11
3
-
markdown-include is built using Node.js and allows you to include markdown files into other markdown files using a C style include syntax:
12
+
markdown-include is built using Node.js and allows you to include markdown files into other markdown files using a C style include syntax.
13
+
14
+
## Compile your markdown files
15
+
16
+
markdown-include's main feature is that it allows you to include allows you to include markdown files into other markdown files, like so:
4
17
5
18
```
6
19
#include "markdown-file.md"
@@ -26,6 +39,12 @@ Something in markdown file!
26
39
Something in another markdown file!
27
40
```
28
41
42
+
## Make a table of contents
43
+
44
+
Aside from compiling your markdown files, markdown-include can also build your table of contents. This works by evaluating the heading tags inside of your files. Since markdown works on using `#` for headings, this makes it easy to assemble table of contents from them. The more `#` you have in front of your headings (up to 6) will decide how the table of contents is built. Use one `#` and it's a top level navigation item... Use two `#` and it would be underneath the previous navigation item.
45
+
46
+
For each heading that you would like to be included in a table of contents just add ` !heading` to the end of it.
|`build`| String | File path of where everything should be compiled, like `README.md`|
75
+
|`files`| Array | Array of files to to compile |
76
+
|`tableOfContents`| Boolean |`true` to build table of contents dynamically |
57
77
58
78
59
79
# How It Works
60
80
61
-
markdown-include works by recursively going through files based on the tags that are found. For instance, considering the following in a `_README.md` file:
81
+
markdown-include works by recursively going through files based on the tags that are found. For instance, consider the following in a `_README.md` file:
Copy file name to clipboardexpand all lines: docs/how_it_works.md
+2-2
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
-
# How It Works
1
+
# How It Works !heading
2
2
3
-
markdown-include works by recursively going through files based on the tags that are found. For instance, considering the following in a `_README.md` file:
3
+
markdown-include works by recursively going through files based on the tags that are found. For instance, consider the following in a `_README.md` file:
markdown-include is very easy to use. Just include a `markdown.json` file in your project root with your options and run from the command line to compile your documents like so:
Copy file name to clipboardexpand all lines: docs/markdown_include.md
+12-2
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,10 @@
1
-
# markdown-include
1
+
# markdown-include !heading
2
2
3
-
markdown-include is built using Node.js and allows you to include markdown files into other markdown files using a C style include syntax:
3
+
markdown-include is built using Node.js and allows you to include markdown files into other markdown files using a C style include syntax.
4
+
5
+
## Compile your markdown files !heading
6
+
7
+
markdown-include's main feature is that it allows you to include allows you to include markdown files into other markdown files, like so:
4
8
5
9
```
6
10
#include "markdown-file.md" !ignore
@@ -26,3 +30,9 @@ Something in markdown file!
26
30
Something in another markdown file!
27
31
```
28
32
33
+
## Make a table of contents !heading
34
+
35
+
Aside from compiling your markdown files, markdown-include can also build your table of contents. This works by evaluating the heading tags inside of your files. Since markdown works on using `#` for headings, this makes it easy to assemble table of contents from them. The more `#` you have in front of your headings (up to 6) will decide how the table of contents is built. Use one `#` and it's a top level navigation item... Use two `#` and it would be underneath the previous navigation item.
36
+
37
+
For each heading that you would like to be included in a table of contents just add ` !heading` to the end of it.
0 commit comments