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
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
|
# Configuration
The configuration for September is managed entirely through environment variables.
## `PORT`
Bind September to a custom port.
Generally, you shouldn't touch this option if you are deploying using Docker.
If no `PORT` is provided or the `PORT` could not be parsed appropriately as an
unsigned 16-bit integer, `PORT` will default to `80`.
```dotenv
PORT=1337
```
## `ROOT`
Root Gemini capsule to proxy when not visiting a "/proxy" route
If no `ROOT` is provided, `ROOT` will default to `"gemini://fuwn.me"`.
```dotenv
ROOT=gemini://fuwn.me
```
## `CSS_EXTERNAL`
A comma-separated list of external CSS files to apply to the HTML response
If no `CSS_EXTERNAL` value is provided, a default stylesheet of
[LaTeX.css](https://latex.vercel.app/) and the styles within
[`default.css`](./default.css) will be applied.
```dotenv
CSS_EXTERNAL=https://cdnjs.cloudflare.com/ajax/libs/mini.css/3.0.1/mini-default.min.css
```
## `KEEP_GEMINI`
A comma-separated list of Gemini URL fragments to keep as is when proxying.
Wildcards are supported using the `*` character, and exceptions can be made
using the `!` character
```dotenv
# These rules ensure that all Gemini URLs will be left untouched in the proxied
# HTML response except for URLs under the "fuwn.me" domain
KEEP_GEMINI=!*fuwn.me/*,gemini://*
```
## `HEAD`
Insert any string at the end of the HTML `<head>`
```dotenv
HEAD=<script>/* September */</script><style>/* September */</style>
```
## `PROXY_BY_DEFAULT`
Control whether all Gemini URLs are proxied.
Similar to `KEEP_GEMINI_EXACT` and `KEEP_GEMINI_DOMAIN`, but global
This configuration value defaults to `true`.
```dotenv
PROXY_BY_DEFAULT=false
```
## `FAVICON_EXTERNAL`
An external favicon file to apply to the HTML response
```dotenv
FAVICON_EXTERNAL=https://example.com/favicon.ico
```
## `PLAIN_TEXT_ROUTE`
A comma-separated list of paths to treat as plain text routes
These patterns do not support regular expressions, but do support the use of `*`
as a wildcard.
```dotenv
PLAIN_TEXT_ROUTE=/robots.txt,/license.txt,*.xml
```
## `MATHJAX`
Enable MathJax support for rendering LaTeX within `$` and `$$` delimiters.
This configuration value defaults to `false`.
```dotenv
MATHJAX=true
```
## `HEADER`
Adds a large text header to the top of a proxy page
Only available in styled routes
```dotenv
HEADER="This string will show up at the top of my proxied capsule."
```
## `EMBED_IMAGES`
Embed images in the HTML response if a link to an image is found.
A value of `1` will enable this feature, while keeping a link to the image.
Any non-empty value other than `1` will enable this feature, while removing the link to the image.
```dotenv
EMBED_IMAGES=2
```
## `CONDENSE_LINKS`
Condense adjacent links to a single line
A value of `*` will condense all adjacent links to a single line.
A comma-separated list of paths will condense adjacent links to a single line only on those paths.
### Example
```plaintext
<!-- Not condensed -->
<p><a href="/">Link</a></p>
<p><a href="/">Link</a></p>
<p><a href="/">Link</a></p>
<!-- Condensed -->
<p><a href="/">Link</a> | <a href="/">Link</a> | <a href="/">Link</a></p>
```
## `PRIMARY_COLOUR`
Set the primary colour of elements in the default stylesheet. This field
controls the colour of items such as links and highlights.
Popular choices are `var(--base0D)` for a blue, or `var(--base09)` for an
amber colour.
### Examples
```plaintext
PRIMARY_COLOUR=var(--base09)
PRIMARY_COLOUR=red
PRIMARY_COLOUR=#ff0000
```
## `CONDENSE_LINKS_AT_HEADING`
This configuration option is similar to `CONDENSE_LINKS`, but only condenses
links found under specific headings.
For instance, I condense the few links I have on my index page under the
"# Fuwn[.me]" heading, and I condense my quick links/navigation panel under the
"## Quick Links" heading.
This way, I don't accidentally condense my entire sitemap, which could be
hundreds of links long, but I do condense my quick links on every page.
```dotenv
CONDENSE_LINKS_AT_HEADINGS="## Quick Links,# Fuwn[.me]"
```
|