Edwin Kempin | 0e180ff | 2014-09-24 16:33:26 +0200 | [diff] [blame] | 1 | Configuration |
| 2 | ============= |
| 3 | |
Edwin Kempin | 8316c63 | 2014-09-26 10:58:42 +0200 | [diff] [blame] | 4 | <a id="projectConfig"> |
| 5 | Project-Specific Configuration |
| 6 | ------------------------------ |
| 7 | |
| 8 | The project-specific configuration of the @PLUGIN@ plugin is done in |
Edwin Kempin | 0e180ff | 2014-09-24 16:33:26 +0200 | [diff] [blame] | 9 | the `@PLUGIN@.config` file in the `refs/meta/config` branch of the |
| 10 | project. |
| 11 | |
| 12 | ``` |
| 13 | [web] |
Edwin Kempin | dd8081b | 2014-11-17 10:54:07 +0100 | [diff] [blame] | 14 | indexRef = master |
Edwin Kempin | 0e180ff | 2014-09-24 16:33:26 +0200 | [diff] [blame] | 15 | indexFile = Documentation/README.md |
| 16 | ``` |
| 17 | |
Edwin Kempin | dd8081b | 2014-11-17 10:54:07 +0100 | [diff] [blame] | 18 | <a id="webIndexRef"> |
| 19 | web.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 Kempin | 0e180ff | 2014-09-24 16:33:26 +0200 | [diff] [blame] | 33 | <a id="webIndexFile"> |
| 34 | web.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 Kempin | 45aff00 | 2014-10-17 17:20:44 +0200 | [diff] [blame] | 40 | Inherited from the parent project if not specified. |
| 41 | |
Edwin Kempin | 0e180ff | 2014-09-24 16:33:26 +0200 | [diff] [blame] | 42 | Default: `README.md` |
Edwin Kempin | 8316c63 | 2014-09-26 10:58:42 +0200 | [diff] [blame] | 43 | |
Edwin Kempin | 3c039bd | 2014-10-10 14:02:02 +0200 | [diff] [blame] | 44 | The global formatter configuration can be overridden per project. |
Edwin Kempin | 45aff00 | 2014-10-17 17:20:44 +0200 | [diff] [blame] | 45 | Child projects inherit the formatter configuration from the parent |
| 46 | projects. Configuring any parameter for a formatter overrides the |
| 47 | complete inherited/global formatter configuration. |
Edwin Kempin | 3c039bd | 2014-10-10 14:02:02 +0200 | [diff] [blame] | 48 | |
| 49 | <a id="ext"> |
| 50 | formatter.<formatter>.ext |
| 51 | : Extension of files that should be rendered by this formatter. |
| 52 | |
Edwin Kempin | 0e926ae | 2014-10-22 12:56:04 +0200 | [diff] [blame] | 53 | If set to `*` all file extensions are handled by this formatter. |
| 54 | |
Edwin Kempin | 3c039bd | 2014-10-10 14:02:02 +0200 | [diff] [blame] | 55 | 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"> |
| 61 | formatter.<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 Kempin | dc98674 | 2014-10-10 15:24:08 +0200 | [diff] [blame] | 69 | <a id="prefix"> |
| 70 | formatter.<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 Kempin | a31f81c | 2014-10-14 22:32:49 +0200 | [diff] [blame] | 78 | <a id="includeToc"> |
| 79 | formatter.<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 Kempin | ee09298 | 2014-11-17 15:36:02 +0100 | [diff] [blame^] | 89 | <a id="inheritCss"> |
| 90 | formatter.<formatter>.inheritCss |
| 91 | : Whether the CSS should be inherited or overridden. |
Edwin Kempin | f1320c2 | 2014-10-14 22:40:38 +0200 | [diff] [blame] | 92 | |
| 93 | If `false` the default CSS is completely replaced by the |
| 94 | project-specific CSS. |
| 95 | |
Edwin Kempin | ee09298 | 2014-11-17 15:36:02 +0100 | [diff] [blame^] | 96 | Overrides the [global configuration of `inheritCss`](#formatterInheritCss) |
Edwin Kempin | f1320c2 | 2014-10-14 22:40:38 +0200 | [diff] [blame] | 97 | for this formatter. |
| 98 | |
| 99 | Supported for the following formatters: `ASCIIDOCTOR`, `MARKDOWN` |
| 100 | |
Edwin Kempin | ee09298 | 2014-11-17 15:36:02 +0100 | [diff] [blame^] | 101 | Default: `true` (CSS is inherited) |
Edwin Kempin | f1320c2 | 2014-10-14 22:40:38 +0200 | [diff] [blame] | 102 | |
Edwin Kempin | e80dca2 | 2014-11-14 08:52:56 +0100 | [diff] [blame] | 103 | <a id="cssTheme"> |
| 104 | formatter.<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 Kempin | b8509ce | 2014-10-22 11:09:57 +0200 | [diff] [blame] | 118 | <a id="prio"> |
| 119 | formatter.<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 Kempin | 9b848aa | 2014-10-13 16:42:09 +0200 | [diff] [blame] | 131 | <a id="projectCss"> |
| 132 | Project-Specific CSS |
| 133 | -------------------- |
| 134 | |
| 135 | For some formatters a custom CSS file for the rendering can be |
| 136 | provided in the `refs/meta/config` branch of the project: |
| 137 | |
Edwin Kempin | f9c2d39 | 2014-11-13 14:15:50 +0100 | [diff] [blame] | 138 | * `ASCIIDOCTOR`: `@PLUGIN@/asciidoctor.css` |
| 139 | * `MARKDOWN`: `@PLUGIN@/markdown.css` |
Edwin Kempin | 9b848aa | 2014-10-13 16:42:09 +0200 | [diff] [blame] | 140 | |
Edwin Kempin | ee09298 | 2014-11-17 15:36:02 +0100 | [diff] [blame^] | 141 | If link:inheritCss[inheritCss] is set to true custom CSS files are |
| 142 | inherited from parent projects. |
Edwin Kempin | 9b848aa | 2014-10-13 16:42:09 +0200 | [diff] [blame] | 143 | |
Edwin Kempin | 8316c63 | 2014-09-26 10:58:42 +0200 | [diff] [blame] | 144 | <a id="globalConfig"> |
| 145 | Global Configuration |
| 146 | -------------------- |
| 147 | |
| 148 | The global configuration of the @PLUGIN@ plugin is done in the |
| 149 | `$site_path/etc/@PLUGIN@.config` file. |
| 150 | |
Edwin Kempin | a246fb7 | 2014-10-02 14:35:53 +0200 | [diff] [blame] | 151 | The plugin contains an init step that creates the initial plugin |
| 152 | configuration. |
| 153 | |
Edwin Kempin | 8316c63 | 2014-09-26 10:58:42 +0200 | [diff] [blame] | 154 | ``` |
Edwin Kempin | 20f85da | 2014-10-09 16:01:40 +0200 | [diff] [blame] | 155 | [formatter "ASCIIDOCTOR"] |
| 156 | ext = adoc |
Edwin Kempin | 8316c63 | 2014-09-26 10:58:42 +0200 | [diff] [blame] | 157 | [formatter "MARKDOWN"] |
Edwin Kempin | a246fb7 | 2014-10-02 14:35:53 +0200 | [diff] [blame] | 158 | mimeType = text/x-markdown |
Edwin Kempin | 64e166d | 2014-10-02 16:09:06 +0200 | [diff] [blame] | 159 | [formatter "PLAIN_TEXT"] |
| 160 | mimeType = text/plain |
Edwin Kempin | 8316c63 | 2014-09-26 10:58:42 +0200 | [diff] [blame] | 161 | ``` |
| 162 | |
Edwin Kempin | 64e166d | 2014-10-02 16:09:06 +0200 | [diff] [blame] | 163 | Supported formatters: |
| 164 | |
Edwin Kempin | 6721567 | 2014-10-08 13:36:19 +0200 | [diff] [blame] | 165 | * `ASCIIDOCTOR` |
Edwin Kempin | 64e166d | 2014-10-02 16:09:06 +0200 | [diff] [blame] | 166 | * `MARKDOWN` |
| 167 | * `PLAIN_TEXT` |
| 168 | |
Edwin Kempin | 3c039bd | 2014-10-10 14:02:02 +0200 | [diff] [blame] | 169 | <a id="formatterExt"> |
Edwin Kempin | 20f85da | 2014-10-09 16:01:40 +0200 | [diff] [blame] | 170 | formatter.<formatter>.ext |
| 171 | : Extension of files that will be rendered by this formatter. |
| 172 | |
Edwin Kempin | 0e926ae | 2014-10-22 12:56:04 +0200 | [diff] [blame] | 173 | If set to `*` all file extensions are handled by this formatter. |
| 174 | |
Edwin Kempin | 20f85da | 2014-10-09 16:01:40 +0200 | [diff] [blame] | 175 | Multiple extensions may be specified for a formatter. |
Edwin Kempin | 64e166d | 2014-10-02 16:09:06 +0200 | [diff] [blame] | 176 | |
Edwin Kempin | 3c039bd | 2014-10-10 14:02:02 +0200 | [diff] [blame] | 177 | Can be overridden on [project-level](#ext). |
| 178 | |
Edwin Kempin | a246fb7 | 2014-10-02 14:35:53 +0200 | [diff] [blame] | 179 | <a id="formatterMimeType"> |
| 180 | formatter.<formatter>.mimeType |
Edwin Kempin | 20f85da | 2014-10-09 16:01:40 +0200 | [diff] [blame] | 181 | : The mime type of files that will be rendered by this formatter. |
Edwin Kempin | a246fb7 | 2014-10-02 14:35:53 +0200 | [diff] [blame] | 182 | |
| 183 | Multiple mime types may be specified for a formatter. |
| 184 | |
Edwin Kempin | 3c039bd | 2014-10-10 14:02:02 +0200 | [diff] [blame] | 185 | Can be overridden on [project-level](#mimeType). |
| 186 | |
Edwin Kempin | dc98674 | 2014-10-10 15:24:08 +0200 | [diff] [blame] | 187 | <a id="formatterPrefix"> |
| 188 | formatter.<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 Kempin | 8316c63 | 2014-09-26 10:58:42 +0200 | [diff] [blame] | 195 | <a id="formatterAllowHtml"> |
| 196 | formatter.<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 Kempin | 3c039bd | 2014-10-10 14:02:02 +0200 | [diff] [blame] | 210 | *CANNOT* be overridden on project-level. |
| 211 | |
Edwin Kempin | 0d0fdce | 2014-10-20 11:06:24 +0200 | [diff] [blame] | 212 | Supported for the following formatters: `ASCIIDOCTOR`, `MARKDOWN` |
Edwin Kempin | 8316c63 | 2014-09-26 10:58:42 +0200 | [diff] [blame] | 213 | |
| 214 | Default: `false` |
Edwin Kempin | f860e1d | 2014-10-10 15:03:28 +0200 | [diff] [blame] | 215 | |
| 216 | <a id="formatterEnabled"> |
| 217 | formatter.<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 Kempin | 3f2e91c | 2014-10-14 09:52:38 +0200 | [diff] [blame] | 226 | |
| 227 | <a id="formatterIncludeToc"> |
| 228 | formatter.<formatter>.includeToc |
| 229 | : Whether a Table Of Contents should be included into each document. |
| 230 | |
Edwin Kempin | a31f81c | 2014-10-14 22:32:49 +0200 | [diff] [blame] | 231 | Can be overridden on [project-level](#includeToc). |
Edwin Kempin | 3f2e91c | 2014-10-14 09:52:38 +0200 | [diff] [blame] | 232 | |
| 233 | Supported for the following formatters: `ASCIIDOCTOR` |
| 234 | |
| 235 | Default: `true` |
Edwin Kempin | f1320c2 | 2014-10-14 22:40:38 +0200 | [diff] [blame] | 236 | |
Edwin Kempin | ee09298 | 2014-11-17 15:36:02 +0100 | [diff] [blame^] | 237 | <a id="formatterInheritCss"> |
| 238 | formatter.<formatter>.inheritCss |
| 239 | : Whether CSS should be inherited or overridden. |
Edwin Kempin | f1320c2 | 2014-10-14 22:40:38 +0200 | [diff] [blame] | 240 | |
| 241 | If `false` the default CSS is completely replaced by the |
| 242 | project-specific CSS. |
| 243 | |
Edwin Kempin | ee09298 | 2014-11-17 15:36:02 +0100 | [diff] [blame^] | 244 | Can be overridden on [project-level](#inheritCss). |
Edwin Kempin | f1320c2 | 2014-10-14 22:40:38 +0200 | [diff] [blame] | 245 | |
| 246 | Supported for the following formatters: `ASCIIDOCTOR`, `MARKDOWN` |
| 247 | |
Edwin Kempin | ee09298 | 2014-11-17 15:36:02 +0100 | [diff] [blame^] | 248 | Default: `true` (CSS is inherited) |
Edwin Kempin | b8509ce | 2014-10-22 11:09:57 +0200 | [diff] [blame] | 249 | |
Edwin Kempin | e80dca2 | 2014-11-14 08:52:56 +0100 | [diff] [blame] | 250 | <a id="formatterCssTheme"> |
| 251 | formatter.<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 Kempin | b8509ce | 2014-10-22 11:09:57 +0200 | [diff] [blame] | 263 | <a id="formatterPrio"> |
| 264 | formatter.<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 Kempin | 316492c | 2014-10-30 15:25:37 +0100 | [diff] [blame] | 274 | |
| 275 | <a id="rawFormatter"> |
| 276 | formatter.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 Kempin | 3d9f46c | 2014-11-13 15:30:10 +0100 | [diff] [blame] | 288 | |
| 289 | <a id="globalDefaultCss"> |
| 290 | Global Default CSS |
| 291 | ------------------ |
| 292 | |
| 293 | Gerrit administrators can override the built-in default CSS by |
| 294 | providing CSS files in `<review-site>/data/@PLUGIN@/css/`: |
| 295 | |
| 296 | * `ASCIIDOCTOR`: `asciidoctor.css` |
| 297 | * `MARKDOWN`: `markdown.css` |