Skip to content

Commit cf52afe

Browse files
committed
Added example folder
1 parent a771960 commit cf52afe

4 files changed

Lines changed: 51 additions & 0 deletions

File tree

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,10 @@ Config values resolve in this priority:
147147
3. TOML config file
148148
4. Hardcoded defaults
149149

150+
## Example
151+
152+
See example [config](example/book/config), [shelf](example/book/shelf.d/archive.toml), and [template](example/book/template.json) files.
153+
150154
## Customization
151155

152156
### Theme

example/book/config

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
shelf_directory = "/Users/username/.config/book/shelf.d"
2+
catalog_format = "toml"
3+
autoconfirm = true
4+
interactive = true

example/book/shelf.d/archive.toml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
shelf_name = "archive"
2+
shelf_desc = "where books get lost!"
3+
4+
[Collections]
5+
[Collections.alpha]
6+
collection_name = "alpha"
7+
collection_desc = "first collection for losing in the stacks"
8+
9+
[[Collections.alpha.marks]]
10+
catalog_id = "569273e2"
11+
title = "Example Article One"
12+
url = "https://example.com/article-one"
13+
tags = ["demo", "test"]
14+
15+
[Collections.beta]
16+
collection_name = "beta"
17+
collection_desc = "second collection collecting dust"
18+
19+
[[Collections.beta.marks]]
20+
catalog_id = "0ff1faa4"
21+
title = "Example Article Two"
22+
url = "https://example.com/article-two"
23+
tags = ["sample", "fixture"]
24+
25+
[[Collections.beta.marks]]
26+
catalog_id = "d86b5744"
27+
title = "Example Article Three"
28+
url = "https://example.com/article-three"
29+
tags = ["sample", "fixture", "demo"]

example/book/template.json

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"collection-list": {
3+
"primary_title": "Congratulations! You picked shelf:",
4+
"list_title": "With the auspicious list of collections:"
5+
},
6+
"mark-list": {
7+
"primary_title": "Congratulations! You picked shelf:",
8+
"secondary_title": "With the infamous collection:",
9+
"list_title": "With the worrisome list of marks:"
10+
},
11+
"shelf-list": {
12+
"list_title": "Congratulations! You've knocked over all your shelves:"
13+
}
14+
}

0 commit comments

Comments
 (0)