@readme/cli 0.2.0 → 0.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,199 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "title": "ReadMe frontmatter shapes",
4
+ "oneOf": [
5
+ {
6
+ "title": "Page",
7
+ "description": "This is the shape for files within the `docs/` directory.",
8
+ "$ref": "#/defs/filetype-page"
9
+ },
10
+ {
11
+ "title": "Custom Page",
12
+ "description": "This is the shape for files within the `custom_pages/` directory.",
13
+ "allOf": [
14
+ { "$ref": "#/defs/common-page" },
15
+ { "type": "object", "properties": { "fullscreen": { "type": ["boolean", "null"] } } }
16
+ ],
17
+ "required": ["title"],
18
+ "not": {
19
+ "type": "object",
20
+ "properties": { "deprecated": { "type": "boolean" } },
21
+ "description": "Custom pages have everything that a common page has except that they can't be deprecated."
22
+ }
23
+ },
24
+ {
25
+ "title": "API Reference",
26
+ "description": "This is the shape for files within the `reference/` directory.",
27
+ "allOf": [
28
+ { "$ref": "#/defs/filetype-page" },
29
+ {
30
+ "type": "object",
31
+ "properties": {
32
+ "api": {
33
+ "anyOf": [
34
+ {
35
+ "type": "object",
36
+ "properties": {
37
+ "file": { "type": "string" },
38
+ "operationId": { "type": "string" },
39
+ "webhook": { "type": ["boolean", "null"] }
40
+ },
41
+ "required": ["file", "operationId"]
42
+ },
43
+ { "type": "null" }
44
+ ],
45
+ "description": "Information about the API operation that this page is documenting. Setting this to `null` will detach it from the API operation and make it a standard page."
46
+ },
47
+ "api_config": {
48
+ "anyOf": [
49
+ { "type": "string", "enum": ["authentication", "getting-started", "my-requests"] },
50
+ { "type": "null" }
51
+ ],
52
+ "description": "Describes a Reference config page of a particular type."
53
+ },
54
+ "recipes": {
55
+ "anyOf": [{ "type": "array", "items": { "type": "string" } }, { "type": "null" }],
56
+ "description": "A collection of recipes that are related to this API operation."
57
+ }
58
+ }
59
+ }
60
+ ]
61
+ },
62
+ {
63
+ "title": "Recipe",
64
+ "description": "This is the shape for files within the `recipes/` directory.",
65
+ "allOf": [
66
+ { "$ref": "#/defs/core" },
67
+ {
68
+ "type": "object",
69
+ "properties": {
70
+ "description": { "type": ["string", "null"] },
71
+ "recipe": {
72
+ "type": "object",
73
+ "properties": {
74
+ "color": { "type": "string", "pattern": "^#[0-9A-Fa-f]{6}$" },
75
+ "icon": { "type": "string" }
76
+ },
77
+ "required": ["color", "icon"]
78
+ }
79
+ }
80
+ }
81
+ ],
82
+ "required": ["title", "recipe"]
83
+ },
84
+ {
85
+ "title": "Custom Block",
86
+ "description": "This is the shape for custom blocks in the `custom_blocks/` directory.",
87
+ "type": "object",
88
+ "properties": { "name": { "type": ["string", "null"] } },
89
+ "required": ["name"]
90
+ }
91
+ ],
92
+ "defs": {
93
+ "core": {
94
+ "title": "Core properties that are available on all file types.",
95
+ "type": "object",
96
+ "properties": { "hidden": { "type": ["boolean", "null"] }, "title": { "type": "string" } }
97
+ },
98
+ "metadata": {
99
+ "title": "Properties that control file metadata.",
100
+ "type": "object",
101
+ "properties": {
102
+ "description": { "type": ["string", "null"] },
103
+ "image": { "type": ["string", "null"] },
104
+ "keywords": { "anyOf": [{ "type": "array", "items": { "type": "string" } }, { "type": "null" }] },
105
+ "robots": { "anyOf": [{ "type": "string", "enum": ["index", "noindex"] }, { "type": "null" }] },
106
+ "title": { "type": ["string", "null"], "description": "This is the title that's used for SEO metadata." }
107
+ }
108
+ },
109
+ "common-page": {
110
+ "allOf": [
111
+ { "$ref": "#/defs/core" },
112
+ {
113
+ "type": "object",
114
+ "properties": {
115
+ "deprecated": { "type": ["boolean", "null"] },
116
+ "excerpt": { "type": ["string", "null"] },
117
+ "icon": { "type": ["string", "null"] },
118
+ "table_of_contents": { "type": ["boolean", "null"] },
119
+ "x-import": {
120
+ "type": ["string", "null"],
121
+ "description": "Set during the docs site import flow. This is a link to the external page that needs to be imported and signifies this page has not yet been imported. It is removed once the page content is imported."
122
+ },
123
+ "metadata": { "$ref": "#/defs/metadata" },
124
+ "next": {
125
+ "type": "object",
126
+ "properties": {
127
+ "description": { "type": ["string", "null"] },
128
+ "pages": {
129
+ "anyOf": [
130
+ {
131
+ "type": "array",
132
+ "items": {
133
+ "anyOf": [
134
+ {
135
+ "type": "object",
136
+ "properties": {
137
+ "slug": { "type": "string" },
138
+ "title": { "type": ["string", "null"] },
139
+ "type": { "type": "string", "enum": ["basic", "endpoint", "changelog", "custom_page"] }
140
+ },
141
+ "description": "A page within the developer site. Does not support multiguides and is generally deprecated in favor of `type: page`."
142
+ },
143
+ {
144
+ "type": "object",
145
+ "properties": {
146
+ "slug": { "type": "string" },
147
+ "directory": {
148
+ "type": "string",
149
+ "pattern": "^[a-z0-9][a-z0-9_-]{0,29}$",
150
+ "description": "The section directory of the page."
151
+ },
152
+ "title": { "type": ["string", "null"] },
153
+ "type": { "type": "string", "const": "page" }
154
+ },
155
+ "description": "A page within the developer site. Multiguides compatible."
156
+ },
157
+ {
158
+ "type": "object",
159
+ "properties": {
160
+ "title": { "type": ["string", "null"] },
161
+ "type": { "type": "string", "const": "link" },
162
+ "url": { "type": "string" }
163
+ }
164
+ }
165
+ ]
166
+ }
167
+ },
168
+ { "type": "null" }
169
+ ]
170
+ }
171
+ }
172
+ }
173
+ }
174
+ }
175
+ ]
176
+ },
177
+ "filetype-page": {
178
+ "allOf": [
179
+ { "$ref": "#/defs/common-page" },
180
+ {
181
+ "type": "object",
182
+ "properties": {
183
+ "link": {
184
+ "anyOf": [
185
+ {
186
+ "type": "object",
187
+ "properties": { "new_tab": { "type": ["boolean", "null"] }, "url": { "type": ["string", "null"] } }
188
+ },
189
+ { "type": "null" }
190
+ ],
191
+ "description": "Information about where this page should redirect to. Setting this to `null` will make the page a standard page."
192
+ }
193
+ }
194
+ }
195
+ ],
196
+ "required": ["title"]
197
+ }
198
+ }
199
+ }