aboutsummaryrefslogtreecommitdiff
path: root/example/Caddyfile
blob: aa12136bec3f0678f87ccd251494aba29a1439b8 (plain)
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
{
	debug
	admin off
	auto_https off
	http_port 8000
}

http://template.localhost {
	root example/static

	# If the path exists in the static directory then serve it directly
	@static file {path} {path}/
	route @static {
		file_server
	}

	# Otherwise send it through the template, which will look for a matching gmi
	# file to render.
	route {
		rewrite * /tpl/render_gemtext.html
		root example
		templates {
			extensions {
				gemtext
			}
		}
		file_server
	}
}