forked from lwchkg/gitbook-pdfgen
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgen_pdf_wk_config_schema.json
129 lines (125 loc) · 3.91 KB
/
gen_pdf_wk_config_schema.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
{
"$schema": "http://json-schema.org/schema#",
"id": "https://gitbook.com/schemas/book.json",
"title": "GitBook Configuration",
"type": "object",
"properties": {
"root": {
"type": "string",
"title": "Path of the root folder containing the book's content",
"default": "."
},
"title": {
"type": "string",
"title": "Title of the book, default is extracted from README"
},
"author": {
"type": "string",
"title": "Name of the author"
},
"direction": {
"type": "string",
"enum": ["ltr", "rtl"],
"title": "Direction of texts, default is detected in the pages"
},
"variables": {
"type": "object",
"title": "Templating context variables"
},
"structure": {
"type": "object",
"properties": {
"summary": {
"default": "SUMMARY.md",
"title": "File to use as table of contents",
"$ref": "#/definitions/filename"
}
}
},
"wkhtmltopdf": {
"type": "object",
"title": "wkhtmltopdf specific configurations",
"properties": {
"paperSize": {
"type": "string",
"enum": ["a0", "a1", "a2", "a3", "a4", "a5", "a6", "b0", "b1", "b2", "b3", "b4", "b5", "b6", "legal", "letter"],
"default": "a4",
"title": "Paper size for the PDF",
"description": "Known issue: only the list from GitBook is used. This is more restrictive than what wkhtmltopdf offers."
},
"margin": {
"type": "object",
"properties": {
"right": {
"title": "Right Margin",
"$ref": "#/definitions/spacing"
},
"left": {
"title": "Left Margin",
"$ref": "#/definitions/spacing"
},
"top": {
"title": "Top Margin",
"$ref": "#/definitions/spacing"
},
"bottom": {
"title": "Bottom Margin",
"$ref": "#/definitions/spacing"
}
}
},
"header": {
"title": "Specify the header for every page.",
"$ref": "#/definitions/headerOrFooterStyle"
},
"footer": {
"title": "Specify the footer for every page.",
"$ref": "#/definitions/headerOrFooterStyle"
},
"tocXsl": {
"title": "Specify the XSL stylesheet of the content page.",
"description": "In the XSL stylesheet, %url_current_dir% will be replaced by the URL of the temporary directory. This is done because it is impossible to refer to the directory of the XSL file.",
"$ref": "#/definitions/filepath"
},
"assets": {
"type": "array",
"title": "Assets to be copied to the temporary directory.",
"items": { "$ref": "#/definitions/filepath" },
"uniqueItems": true
}
}
}
},
"required": [],
"definitions": {
"filename": {
"description": "Filename rule, copied from GitBook. Known issues: only a subset of all possible characters can be used.",
"type": "string",
"pattern": "^[a-zA-Z-._\\d,\\s]+$"
},
"filepath": {
"type": "string",
"pattern": "^([a-zA-Z-._\\d,\\s]+)(/[a-zA-Z-._\\d,\\s]+)*$"
},
"headerOrFooterStyle": {
"type": "object",
"properties": {
"contentHtml": {
"title": "The content of the header or footer (in HTML)",
"description": "The content is an HTML file, which will be copied, with pathnames removed, into the temporary directory.",
"$ref": "#/definitions/filepath"
},
"spacing": {
"title": "The space between the footer and the main content.",
"$ref": "#/definitions/spacing",
"default": "5"
}
}
},
"spacing": {
"type": "string",
"pattern": "^[\\d]+(\\.[\\d]+)?(mm|cm|in|px|pt)?",
"default": "25.4"
}
}
}