summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--roseh.moe.go6
-rw-r--r--templates/index.html.template2
2 files changed, 6 insertions, 2 deletions
diff --git a/roseh.moe.go b/roseh.moe.go
index 5ca646d..d03d106 100644
--- a/roseh.moe.go
+++ b/roseh.moe.go
@@ -185,7 +185,11 @@ func makeETag(content io.Reader) (string, error) {
var (
//go:embed templates/outline.html.template
outlineString string
- outlineTemplate = template.Must(template.New("outline").Parse(outlineString))
+ outlineTemplate = template.Must(template.New("outline").Funcs(template.FuncMap{
+ "host": func() string {
+ return selfURL.Host
+ },
+ }).Parse(outlineString))
)
func outlinedTemplate(s string) (*template.Template, error) {
diff --git a/templates/index.html.template b/templates/index.html.template
index ed882e0..6fc67d0 100644
--- a/templates/index.html.template
+++ b/templates/index.html.template
@@ -9,7 +9,7 @@
<img src="/static/index/kanna.webp" alt="A dragon loli" style="border-radius:50%;margin:-145px auto 20px">
</div>
- <p><a href="https://code.roseh.moe">Projects</a>
+ <p><a href="//code.{{host}}">Projects</a>
<p><a href="/games/">Games?</a>
<p><a href="/wormhole">Magic wormhole</a>
</section>