commit 140afd3caceded38deb938cf719e9bac2d7a5ef3
parent d1dd605b26ce9fb4c9cdd3969956f0f95699d200
Author: corndog <cauchyn@firemail.cc>
Date: Thu, 4 Oct 2018 19:51:18 -0700
First attempt at hosting static git generator
Put extra caddy configurations in caddy dir
Diffstat:
5 files changed, 54 insertions(+), 36 deletions(-)
diff --git a/.gitignore b/.gitignore
@@ -1,2 +1,2 @@
-Secret
+caddy/secret
out/
diff --git a/Caddyfile b/Caddyfile
@@ -1,22 +1,41 @@
-import Redirects
+import caddy/redirects
-grgr.me {
- import Secret
- root ./out
- browse /sits/releases
- ext .html .txt
- redir 303 {
- /pgp /pgp.txt
- /PGP /pgp.txt
- }
+(header) {
header / {
Content-Security-Policy "default-src 'self' https: 'unsafe-eval' 'unsafe-inline'"
Referrer-Policy "same-origin"
X-Frame-Options "DENY"
}
+}
+
+(log) {
log / .log/access.log "{combined}" {
rotate { }
}
+}
+
+grgr.me {
+ import caddy/secret
+ import header
+ import log
+
+ root ./out
+ browse /sits/releases
+ ext .html .txt
+ redir 303 {
+ /pgp /pgp.txt
+ /PGP /pgp.txt
+ }
+ minify
+ gzip
+}
+
+git.grgr.me {
+ import header
+ import log
+
+ root ./out/git
+ index log.html
minify
gzip
}
diff --git a/Redirects b/Redirects
@@ -1,23 +0,0 @@
-www.grgr.me {
- redir https://grgr.me{uri}
-}
-
-grgr.me/fizzbuzz {
- redir / https://gitlab.com/corndog/fizzbuzz/tree/master 303
-}
-
-grgr.me/galois {
- redir / https://gitlab.com/corndog/galois/tree/master 303
-}
-
-grgr.me/ksa {
- redir / https://github.com/Koushien/keyboard-shortcut-api 303
-}
-
-grgr.me/suguri {
- redir / https://gitlab.com/aos2 303
-}
-
-grgr.me/tri {
- redir / https://github.com/cmcaine/tridactyl/tree/master 303
-}
diff --git a/caddy/redirects b/caddy/redirects
@@ -0,0 +1,23 @@
+www.grgr.me {
+ redir https://grgr.me{uri}
+}
+
+grgr.me/fizzbuzz {
+ redir / https://gitlab.com/corndog/fizzbuzz/tree/master 303
+}
+
+grgr.me/galois {
+ redir / https://gitlab.com/corndog/galois/tree/master 303
+}
+
+grgr.me/ksa {
+ redir / https://github.com/Koushien/keyboard-shortcut-api 303
+}
+
+grgr.me/suguri {
+ redir / https://gitlab.com/aos2 303
+}
+
+grgr.me/tri {
+ redir / https://github.com/tridactyl 303
+}
diff --git a/in/robots.txt b/in/robots.txt
@@ -1,8 +1,7 @@
User-agent: *
Disallow: /index.html
-Disallow: /V6eHU.txt
-Disallow: /galois
Disallow: /me
Disallow: /sits
+Disallow: /git
Disallow: /static
Disallow: /*