blob: 26d773edc4733961b8ebb8e1d1d1d98350c59a75 [file] [log] [blame] [view]
Edwin Kempin0e180ff2014-09-24 16:33:26 +02001Configuration
2=============
3
Edwin Kempin8316c632014-09-26 10:58:42 +02004<a id="projectConfig">
5Project-Specific Configuration
6------------------------------
7
8The project-specific configuration of the @PLUGIN@ plugin is done in
Edwin Kempin0e180ff2014-09-24 16:33:26 +02009the `@PLUGIN@.config` file in the `refs/meta/config` branch of the
10project.
11
12```
13 [web]
Edwin Kempindd8081b2014-11-17 10:54:07 +010014 indexRef = master
Edwin Kempin0e180ff2014-09-24 16:33:26 +020015 indexFile = Documentation/README.md
16```
17
Edwin Kempindd8081b2014-11-17 10:54:07 +010018<a id="webIndexRef">
19web.indexRef
20: The reference from which the documentation should be loaded if a
21 revision is not specified.
22
23 The documentation links in the project list will link to the index
24 file in this reference.
25
26 For branches the `refs/heads/` prefix may be omitted, all other
27 refs must be fully specified.
28
29 Inherited from the parent project if not specified.
30
31 Default: `HEAD`
32
Edwin Kempin0e180ff2014-09-24 16:33:26 +020033<a id="webIndexFile">
34web.indexFile
35: The documentation file that serves as entry point for the project
36 documentation.
37
38 The documentation links in web UI will link to this file.
39
Edwin Kempin45aff002014-10-17 17:20:44 +020040 Inherited from the parent project if not specified.
41
Edwin Kempin0e180ff2014-09-24 16:33:26 +020042 Default: `README.md`
Edwin Kempin8316c632014-09-26 10:58:42 +020043
Edwin Kempin3c039bd2014-10-10 14:02:02 +020044The global formatter configuration can be overridden per project.
Edwin Kempin45aff002014-10-17 17:20:44 +020045Child projects inherit the formatter configuration from the parent
46projects. Configuring any parameter for a formatter overrides the
47complete inherited/global formatter configuration.
Edwin Kempin3c039bd2014-10-10 14:02:02 +020048
49<a id="ext">
50formatter.<formatter>.ext
51: Extension of files that should be rendered by this formatter.
52
Edwin Kempin0e926ae2014-10-22 12:56:04 +020053 If set to `*` all file extensions are handled by this formatter.
54
Edwin Kempin3c039bd2014-10-10 14:02:02 +020055 Multiple extensions may be specified for a formatter.
56
57 Overrides the [globally configured file extensions](#formatterExt)
58 for this formatter.
59
60<a id="mimeType">
61formatter.<formatter>.mimeType
62: The mime type of files that should be rendered by this formatter.
63
64 Multiple mime types may be specified for a formatter.
65
66 Overrides the [globally configured mime types](#formatterMimeType)
67 for this formatter.
68
Edwin Kempindc986742014-10-10 15:24:08 +020069<a id="prefix">
70formatter.<formatter>.prefix
71: The prefix that a file must match to be handled by this formatter.
72
73 Multiple prefixes may be specified for a formatter.
74
75 Overrides the [globally configured prefixes](#formatterPrefix)
76 for this formatter.
77
Edwin Kempina31f81c2014-10-14 22:32:49 +020078<a id="includeToc">
79formatter.<formatter>.includeToc
80: Whether a Table Of Contents should be included into each document.
81
82 Overrides the [global configuration of `includeToc`](#formatterIncludeToc)
83 for this formatter.
84
85 Supported for the following formatters: `ASCIIDOCTOR`
86
87 Default: `true`
88
Edwin Kempinee092982014-11-17 15:36:02 +010089<a id="inheritCss">
90formatter.<formatter>.inheritCss
91: Whether the CSS should be inherited or overridden.
Edwin Kempinf1320c22014-10-14 22:40:38 +020092
93 If `false` the default CSS is completely replaced by the
94 project-specific CSS.
95
Edwin Kempinee092982014-11-17 15:36:02 +010096 Overrides the [global configuration of `inheritCss`](#formatterInheritCss)
Edwin Kempinf1320c22014-10-14 22:40:38 +020097 for this formatter.
98
99 Supported for the following formatters: `ASCIIDOCTOR`, `MARKDOWN`
100
Edwin Kempinee092982014-11-17 15:36:02 +0100101 Default: `true` (CSS is inherited)
Edwin Kempinf1320c22014-10-14 22:40:38 +0200102
Edwin Kempine80dca22014-11-14 08:52:56 +0100103<a id="cssTheme">
104formatter.<formatter>.cssTheme
105: The name of the CSS theme that should be used.
106
107 The theme name is included into the file name when loading a CSS
108 file, e.g. `@PLUGIN@/markdown-<theme-name>.css` when loading
109 project specific CSS from the project's `refs/meta/config` branch.
110
111 Overrides the [global configuration of `cssTheme`](#formatterCssTheme)
112 for this formatter.
113
114 Supported for the following formatters: `ASCIIDOCTOR`, `MARKDOWN`
115
116 By default not set.
117
Edwin Kempinb8509ce2014-10-22 11:09:57 +0200118<a id="prio">
119formatter.<formatter>.prio
120: The priority of this formatter.
121
122 If several formatters can handle a file, the formatter with the
123 higher priority is taken. If formatters have the same priority it
124 is undefined which formatter is used.
125
126 Overrides the [global configured priority](#formatterPrio) for this
127 formatter.
128
129 Default: `0`
130
Edwin Kempin9b848aa2014-10-13 16:42:09 +0200131<a id="projectCss">
132Project-Specific CSS
133--------------------
134
135For some formatters a custom CSS file for the rendering can be
136provided in the `refs/meta/config` branch of the project:
137
Edwin Kempinf9c2d392014-11-13 14:15:50 +0100138* `ASCIIDOCTOR`: `@PLUGIN@/asciidoctor.css`
139* `MARKDOWN`: `@PLUGIN@/markdown.css`
Edwin Kempin9b848aa2014-10-13 16:42:09 +0200140
Edwin Kempinee092982014-11-17 15:36:02 +0100141If link:inheritCss[inheritCss] is set to true custom CSS files are
142inherited from parent projects.
Edwin Kempin9b848aa2014-10-13 16:42:09 +0200143
Edwin Kempin8316c632014-09-26 10:58:42 +0200144<a id="globalConfig">
145Global Configuration
146--------------------
147
148The global configuration of the @PLUGIN@ plugin is done in the
149`$site_path/etc/@PLUGIN@.config` file.
150
Edwin Kempina246fb72014-10-02 14:35:53 +0200151The plugin contains an init step that creates the initial plugin
152configuration.
153
Edwin Kempin8316c632014-09-26 10:58:42 +0200154```
Edwin Kempin20f85da2014-10-09 16:01:40 +0200155 [formatter "ASCIIDOCTOR"]
156 ext = adoc
Edwin Kempin8316c632014-09-26 10:58:42 +0200157 [formatter "MARKDOWN"]
Edwin Kempina246fb72014-10-02 14:35:53 +0200158 mimeType = text/x-markdown
Edwin Kempin64e166d2014-10-02 16:09:06 +0200159 [formatter "PLAIN_TEXT"]
160 mimeType = text/plain
Edwin Kempin8316c632014-09-26 10:58:42 +0200161```
162
Edwin Kempin64e166d2014-10-02 16:09:06 +0200163Supported formatters:
164
Edwin Kempin67215672014-10-08 13:36:19 +0200165* `ASCIIDOCTOR`
Edwin Kempin64e166d2014-10-02 16:09:06 +0200166* `MARKDOWN`
167* `PLAIN_TEXT`
168
Edwin Kempin3c039bd2014-10-10 14:02:02 +0200169<a id="formatterExt">
Edwin Kempin20f85da2014-10-09 16:01:40 +0200170formatter.<formatter>.ext
171: Extension of files that will be rendered by this formatter.
172
Edwin Kempin0e926ae2014-10-22 12:56:04 +0200173 If set to `*` all file extensions are handled by this formatter.
174
Edwin Kempin20f85da2014-10-09 16:01:40 +0200175 Multiple extensions may be specified for a formatter.
Edwin Kempin64e166d2014-10-02 16:09:06 +0200176
Edwin Kempin3c039bd2014-10-10 14:02:02 +0200177 Can be overridden on [project-level](#ext).
178
Edwin Kempina246fb72014-10-02 14:35:53 +0200179<a id="formatterMimeType">
180formatter.<formatter>.mimeType
Edwin Kempin20f85da2014-10-09 16:01:40 +0200181: The mime type of files that will be rendered by this formatter.
Edwin Kempina246fb72014-10-02 14:35:53 +0200182
183 Multiple mime types may be specified for a formatter.
184
Edwin Kempin3c039bd2014-10-10 14:02:02 +0200185 Can be overridden on [project-level](#mimeType).
186
Edwin Kempindc986742014-10-10 15:24:08 +0200187<a id="formatterPrefix">
188formatter.<formatter>.prefix
189: The prefix that a file must match to be handled by this formatter.
190
191 Multiple prefixes may be specified for a formatter.
192
193 Can be overridden on [project-level](#prefix).
194
Edwin Kempin8316c632014-09-26 10:58:42 +0200195<a id="formatterAllowHtml">
196formatter.<formatter>.allowHtml
197: Whether inline HTML blocks and inline HTML tags are allowed for
198 this formatter.
199
200 If `false` inline HTML blocks as well as inline HTML tags are
201 suppressed. Both will be accepted in the input but not be contained
202 in the output.
203
204 When this option is changed the `xdocs-x_doc_resources` cache must
205 be flushed.
206
207 **WARNING:** Allowing HTML for user-provided input is a security
208 risk, e.g. code for XSS attacks may be contained in the HTML.
209
Edwin Kempin3c039bd2014-10-10 14:02:02 +0200210 *CANNOT* be overridden on project-level.
211
Edwin Kempin0d0fdce2014-10-20 11:06:24 +0200212 Supported for the following formatters: `ASCIIDOCTOR`, `MARKDOWN`
Edwin Kempin8316c632014-09-26 10:58:42 +0200213
214 Default: `false`
Edwin Kempinf860e1d2014-10-10 15:03:28 +0200215
216<a id="formatterEnabled">
217formatter.<formatter>.enabled
218: Whether this formatter is enabled.
219
220 When a formatter is disabled the `xdocs-x_doc_resources` cache must
221 be flushed.
222
223 *CANNOT* be overridden on project-level.
224
225 Default: `true`
Edwin Kempin3f2e91c2014-10-14 09:52:38 +0200226
227<a id="formatterIncludeToc">
228formatter.<formatter>.includeToc
229: Whether a Table Of Contents should be included into each document.
230
Edwin Kempina31f81c2014-10-14 22:32:49 +0200231 Can be overridden on [project-level](#includeToc).
Edwin Kempin3f2e91c2014-10-14 09:52:38 +0200232
233 Supported for the following formatters: `ASCIIDOCTOR`
234
235 Default: `true`
Edwin Kempinf1320c22014-10-14 22:40:38 +0200236
Edwin Kempinee092982014-11-17 15:36:02 +0100237<a id="formatterInheritCss">
238formatter.<formatter>.inheritCss
239: Whether CSS should be inherited or overridden.
Edwin Kempinf1320c22014-10-14 22:40:38 +0200240
241 If `false` the default CSS is completely replaced by the
242 project-specific CSS.
243
Edwin Kempinee092982014-11-17 15:36:02 +0100244 Can be overridden on [project-level](#inheritCss).
Edwin Kempinf1320c22014-10-14 22:40:38 +0200245
246 Supported for the following formatters: `ASCIIDOCTOR`, `MARKDOWN`
247
Edwin Kempinee092982014-11-17 15:36:02 +0100248 Default: `true` (CSS is inherited)
Edwin Kempinb8509ce2014-10-22 11:09:57 +0200249
Edwin Kempine80dca22014-11-14 08:52:56 +0100250<a id="formatterCssTheme">
251formatter.<formatter>.cssTheme
252: The name of the CSS theme that should be used.
253
254 The theme name is included into the file name when loading a CSS
255 file, e.g. `<review-site>/data/@PLUGIN@/css/markdown-<theme-name>.css`
256
257 Can be overridden on [project-level](#cssTheme).
258
259 Supported for the following formatters: `ASCIIDOCTOR`, `MARKDOWN`
260
261 By default not set.
262
Edwin Kempinb8509ce2014-10-22 11:09:57 +0200263<a id="formatterPrio">
264formatter.<formatter>.prio
265: The priority of this formatter.
266
267 If several formatters can handle a file, the formatter with the
268 higher priority is taken. If formatters have the same priority it
269 is undefined which formatter is used.
270
271 Can be overridden on [project-level](#prio).
272
273 Default: `0`
Edwin Kempin316492c2014-10-30 15:25:37 +0100274
275<a id="rawFormatter">
276formatter.RAW.formatter
277: The name of the formatter that should be used as RAW formatter.
278
279 The RAW formatter is used when the `raw` URL parameter is appended
280 to the project documentation URL.
281
282 When this option is changed the `xdocs-x_doc_resources` cache must
283 be flushed.
284
285 *CANNOT* be overridden on project-level.
286
287 Default: `PLAIN_TEXT`
Edwin Kempin3d9f46c2014-11-13 15:30:10 +0100288
289<a id="globalDefaultCss">
290Global Default CSS
291------------------
292
293Gerrit administrators can override the built-in default CSS by
294providing CSS files in `<review-site>/data/@PLUGIN@/css/`:
295
296* `ASCIIDOCTOR`: `asciidoctor.css`
297* `MARKDOWN`: `markdown.css`