mirror of
https://github.com/MatMoul/dokytree.git
synced 2025-11-20 22:42:05 +00:00
Inital commit
This commit is contained in:
17
samples/doc_v1/doc/structure/01_tree/_index.01.md
Normal file
17
samples/doc_v1/doc/structure/01_tree/_index.01.md
Normal file
@@ -0,0 +1,17 @@
|
||||
```
|
||||
doc
|
||||
|- doc/ # Documentation tree
|
||||
| |- category/ # Child node
|
||||
| | |- _index.yaml # Node information
|
||||
| | |- item1.yaml # Item data
|
||||
| | |- item1.01.md # Item extra file
|
||||
| |- _index.yaml # Node information
|
||||
| |- _index.01.md # Node extra file
|
||||
| |- _index.01.txt # Node extra file
|
||||
| |- _index.01.pug # Node extra file
|
||||
| |- _index.01.svg # Node extra file
|
||||
|- templates/ # Pug Templates
|
||||
| |- template1.pug # A pugjs template
|
||||
| |- template2.pug # A pugjs template
|
||||
|- doc.yaml # Documentation main file
|
||||
```
|
||||
3
samples/doc_v1/doc/structure/01_tree/_index.yaml
Normal file
3
samples/doc_v1/doc/structure/01_tree/_index.yaml
Normal file
@@ -0,0 +1,3 @@
|
||||
title: Tree
|
||||
headfiles:
|
||||
- 01.md
|
||||
4
samples/doc_v1/doc/structure/02_doc.yaml/_index.01.md
Normal file
4
samples/doc_v1/doc/structure/02_doc.yaml/_index.01.md
Normal file
@@ -0,0 +1,4 @@
|
||||
``` yaml
|
||||
doc: 'doc' # Optional: Documentation directory
|
||||
templates: 'templates' # Optional: Templates directory
|
||||
```
|
||||
3
samples/doc_v1/doc/structure/02_doc.yaml/_index.yaml
Normal file
3
samples/doc_v1/doc/structure/02_doc.yaml/_index.yaml
Normal file
@@ -0,0 +1,3 @@
|
||||
title: doc.yaml
|
||||
files:
|
||||
- 01.md
|
||||
15
samples/doc_v1/doc/structure/03_index.yaml/_index.01.md
Normal file
15
samples/doc_v1/doc/structure/03_index.yaml/_index.01.md
Normal file
@@ -0,0 +1,15 @@
|
||||
``` yaml
|
||||
index: 1 # Optional: Override node index
|
||||
title: Documentation # Optional: Override node title
|
||||
toc: true # Optional: Show in TOC (default: true)
|
||||
book: true # Optional: Include in book (default: true)
|
||||
templates: # Optional: Templates
|
||||
node: 'template1' # Optional: Node template (default: @node)
|
||||
items: 'template2' # Optional: Items template (default: @item)
|
||||
headfiles: # Optional: Additional file on top of node document
|
||||
- 01.md
|
||||
files: # Optional: Additional file in node document
|
||||
- 01.md
|
||||
footfiles:
|
||||
- 01.md # Optional: Additional file at bootom of node document
|
||||
```
|
||||
3
samples/doc_v1/doc/structure/03_index.yaml/_index.yaml
Normal file
3
samples/doc_v1/doc/structure/03_index.yaml/_index.yaml
Normal file
@@ -0,0 +1,3 @@
|
||||
title: _index.yaml
|
||||
files:
|
||||
- 01.md
|
||||
9
samples/doc_v1/doc/structure/04_item.yaml/_index.01.md
Normal file
9
samples/doc_v1/doc/structure/04_item.yaml/_index.01.md
Normal file
@@ -0,0 +1,9 @@
|
||||
``` yaml
|
||||
name: Item1 # Optional: Override name of item
|
||||
headfiles: # Optional: Additional file on top of node document
|
||||
- 01.md
|
||||
files: # Optional: Additional file in node document
|
||||
- 01.md
|
||||
footfiles: # Optional: Additional file at bootom of node document
|
||||
- 01.md
|
||||
```
|
||||
3
samples/doc_v1/doc/structure/04_item.yaml/_index.yaml
Normal file
3
samples/doc_v1/doc/structure/04_item.yaml/_index.yaml
Normal file
@@ -0,0 +1,3 @@
|
||||
title: item.yaml
|
||||
files:
|
||||
- 01.md
|
||||
@@ -0,0 +1,9 @@
|
||||
You can store additionnal files related to the yaml file.
|
||||
As exemple, with _index.yaml, you can add _index.01.md or _index.01.svg.
|
||||
You can use the same method with item.yaml files.
|
||||
Thoses files can be added as headfile, file or footfiles just using 01.md or 01.svg.
|
||||
|
||||
### Supported extentions
|
||||
Text: txt adoc
|
||||
Parsed: md html pug
|
||||
Images: svg png jpg jpeg gif bmp
|
||||
@@ -0,0 +1,3 @@
|
||||
title: .file.ext
|
||||
files:
|
||||
- 01.md
|
||||
19
samples/doc_v1/doc/structure/06_template.pug/_index.01.md
Normal file
19
samples/doc_v1/doc/structure/06_template.pug/_index.01.md
Normal file
@@ -0,0 +1,19 @@
|
||||
``` pug
|
||||
div#HEADFILES // Headfiles container
|
||||
// Your pugjs code
|
||||
div#FILES // Files container
|
||||
// Your pugjs code
|
||||
div#FOOTFILES // Footfiles container
|
||||
```
|
||||
|
||||
### Informations
|
||||
|
||||
pugjs documentation can be found here :
|
||||
[https://pugjs.org/](https://pugjs.org/)
|
||||
|
||||
When you use pugjs with dokytree, you have some additional objets :
|
||||
```
|
||||
doc // The document root node
|
||||
node // The current node
|
||||
compareIP // A helper to sort IP v4
|
||||
```
|
||||
3
samples/doc_v1/doc/structure/06_template.pug/_index.yaml
Normal file
3
samples/doc_v1/doc/structure/06_template.pug/_index.yaml
Normal file
@@ -0,0 +1,3 @@
|
||||
title: template.pug
|
||||
files:
|
||||
- 01.md
|
||||
4
samples/doc_v1/doc/structure/_index.yaml
Normal file
4
samples/doc_v1/doc/structure/_index.yaml
Normal file
@@ -0,0 +1,4 @@
|
||||
index: 3
|
||||
title: Structure
|
||||
templates:
|
||||
- node: '@overview'
|
||||
Reference in New Issue
Block a user