File tree Expand file tree Collapse file tree 4 files changed +7
-1
lines changed Expand file tree Collapse file tree 4 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -18,6 +18,8 @@ extension Site
18
18
19
19
case main_js = " main.js "
20
20
case main_js_map = " main.js.map "
21
+
22
+ case robots_txt = " robots.txt "
21
23
}
22
24
}
23
25
extension Site . Asset : FixedRoot
Original file line number Diff line number Diff line change @@ -14,7 +14,8 @@ extension Site.Asset:CacheKey
14
14
case . literata45_woff2,
15
15
. literata47_woff2,
16
16
. literata75_woff2,
17
- . literata77_woff2: return . cold
17
+ . literata77_woff2,
18
+ . robots_txt: return . cold
18
19
case . main_css,
19
20
. main_js: return nil
20
21
case . main_css_map,
@@ -30,6 +31,7 @@ extension Site.Asset:CacheKey
30
31
case . literata47_woff2: return [ " woff2 " , " Literata_24pt-Italic.woff2 " ]
31
32
case . literata75_woff2: return [ " woff2 " , " Literata_24pt-Bold.woff2 " ]
32
33
case . literata77_woff2: return [ " woff2 " , " Literata_24pt-BoldItalic.woff2 " ]
34
+ case . robots_txt: return [ " robots.txt " ]
33
35
case . main_css: return [ " css " , " Main.css " ]
34
36
case . main_css_map: return [ " css " , " Main.css.map " ]
35
37
case . main_js: return [ " js " , " Main.js " ]
@@ -41,6 +43,7 @@ extension Site.Asset:CacheKey
41
43
{
42
44
switch self
43
45
{
46
+ case . robots_txt: return . text( . plain, charset: . utf8)
44
47
case . literata45_woff2,
45
48
. literata47_woff2,
46
49
. literata75_woff2,
Original file line number Diff line number Diff line change @@ -40,6 +40,7 @@ extension AnyOperation
40
40
switch root
41
41
{
42
42
case Site . Admin. root: return . database( AdminOperation . status)
43
+ case " robots.txt " : return . datafile( . init( . robots_txt, tag: tag) )
43
44
case _: return nil
44
45
}
45
46
}
You can’t perform that action at this time.
0 commit comments