aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--main.go5
-rw-r--r--resources.go2
2 files changed, 6 insertions, 1 deletions
diff --git a/main.go b/main.go
index c2eb328..d3d1fbe 100644
--- a/main.go
+++ b/main.go
@@ -25,6 +25,11 @@ func main() {
if err != nil {
clog.Fatal(1, "Loading templates: "+err.Error())
}
+
+ err = serve_static()
+ if err != nil {
+ clog.Fatal(1, "Serving static: "+err.Error())
+ }
http.HandleFunc("/{$}", handle_index)
http.HandleFunc("/{project_name}/repos/{repo_name}/", handle_repo_index)
diff --git a/resources.go b/resources.go
index 737a079..b7ccca6 100644
--- a/resources.go
+++ b/resources.go
@@ -22,7 +22,7 @@ func serve_static() (err error) {
if err != nil {
return err
}
- http.Handle("/static/",
+ http.Handle("/static/{name}",
http.StripPrefix(
"/static/",
http.FileServer(http.FS(static_fs)),