diff --git a/docs/css/index.css b/docs/css/index.css new file mode 100644 index 0000000..e69de29 diff --git a/docs/index.html b/docs/index.html index 5035b6e..4c13a20 100644 --- a/docs/index.html +++ b/docs/index.html @@ -5,6 +5,17 @@ + + + + + + + + + + + diff --git a/main.go b/main.go index 1e2bc98..d25fbe6 100644 --- a/main.go +++ b/main.go @@ -68,9 +68,7 @@ func staticFileHandler(w http.ResponseWriter, r *http.Request) { // Clean path, make sure it starts with "docs/" path = strings.TrimPrefix(path, "/") if path == "" { - if err := notFoundTemplate.Execute(w, ""); err != nil { - log.Printf("[Error] Failed to render error page: %v", err) - } + notFoundHandler(w, r) return } @@ -79,9 +77,7 @@ func staticFileHandler(w http.ResponseWriter, r *http.Request) { data, err := webFiles.ReadFile(filePath) if err != nil { log.Printf("[Error] Static file not found: %s", filePath) - if err := notFoundTemplate.Execute(w, ""); err != nil { - log.Printf("[Error] Failed to render error page: %v", err) - } + notFoundHandler(w, r) return }