blob: 9a99ced71ffdc3354c549f2a1f0858248bca6031 [file] [log] [blame] [view]
David Pursehouse240fbff2016-08-25 09:58:15 +09001# Configuration
2
3The `gitiles.config` file supporting the site contains several configuration
4options.
5
6[TOC]
7
David Pursehousef7018102016-08-25 10:10:23 +09008## Core configuration
9
10### Cross-Origin Resource Sharing (CORS)
11
12Gitiles sets the `Access-Control-Allow-Origin` header to the
13HTTP origin of the client if the client's domain matches a regular
14expression defined in `allowOriginRegex`.
15
16```
17[gitiles]
18 allowOriginRegex = http://localhost
19```
20
21By default `allowOriginRegex` is unset, denying all cross-origin requests.
22
David Pursehouse240fbff2016-08-25 09:58:15 +090023## Markdown
24
25### Disabling markdown
26
27Markdown can be completely disabled by setting render to false.
28
29```
30[markdown]
31 render = false
32```
33
34### Markdown size
35
36Markdown files are limited by default to 5 MiB of input text
37per file. This limit is configurable, but should not be raised
38beyond available memory.
39
40```
41[markdown]
42 inputLimit = 5M
43```
44
45### Image size
46
47Referenced [images are inlined](#Images) as base64 encoded URIs.
48The image limit places an upper bound on the byte size of input.
49
50```
51[markdown]
52 imageLimit = 256K
53```
54
55## Google Analytics
56
57[Google Analytics](https://www.google.com/analytics/) can be
58enabled on every rendered markdown page by adding the Property ID
59to the configuration file:
60
61```
62[google]
63 analyticsId = UA-XXXX-Y
64```