mirror of
https://github.com/MatMoul/dokytree.git
synced 2025-11-21 06:52:05 +00:00
Inital commit
This commit is contained in:
54
samples/doc_v1/doc/document/_index.01.md
Normal file
54
samples/doc_v1/doc/document/_index.01.md
Normal file
@@ -0,0 +1,54 @@
|
||||
Document is structured as nodes.
|
||||
The doc object is the root node.
|
||||
Nodes contains child nodes and items.
|
||||
|
||||
```
|
||||
root
|
||||
|-nodes
|
||||
| |-node
|
||||
| | |-nodes
|
||||
| | | |-nodes
|
||||
| | | |-items
|
||||
| | |-items
|
||||
| | |-item1
|
||||
| |-node
|
||||
| |-nodes
|
||||
| | |-nodes
|
||||
| | |-items
|
||||
| |-items
|
||||
| |-item1
|
||||
|-items
|
||||
```
|
||||
|
||||
|
||||
### Node
|
||||
``` json
|
||||
node: {
|
||||
name: '', // ReadOnly: File name
|
||||
title: '', // Optional: Title (default: name)
|
||||
toc: true, // Optional: Show in TOC (default: true)
|
||||
book: true, // Optional: Include in Book (default: true)
|
||||
url: '/', // ReadOnly: Node URL
|
||||
templates: { // Optional
|
||||
node: '@node', // Optional: Node template (default: @node)
|
||||
items: '@item', // Optional: Items template (default: @item)
|
||||
},
|
||||
parent: null, // ReadOnly: Parent node
|
||||
nodes: [], // ReadOnly: Child nodes
|
||||
items: [], // ReadOnly: Items
|
||||
getNode: (name) => {}, // Function: Get child node by name
|
||||
getItem: (name) => {}, // Function: Get item by name
|
||||
}
|
||||
```
|
||||
|
||||
### Item
|
||||
``` json
|
||||
item: {
|
||||
name: '', // Optional: Name
|
||||
title: '', // Optional: Title (default: name)
|
||||
toc: false, // Optional: Show in TOC (default: false)
|
||||
book: true, // Optional: Include in Book (default: true)
|
||||
url: '', // ReadOnly: Item URL
|
||||
data: {}, // ReadOnly: Item Data
|
||||
}
|
||||
```
|
||||
4
samples/doc_v1/doc/document/_index.yaml
Normal file
4
samples/doc_v1/doc/document/_index.yaml
Normal file
@@ -0,0 +1,4 @@
|
||||
index: 4
|
||||
title: Document
|
||||
files:
|
||||
- 01.md
|
||||
Reference in New Issue
Block a user