fix(blogo): handle root directory request

This commit is contained in:
Guz
2025-01-09 11:06:31 -03:00
parent 858df696e9
commit 3ad673fa55

View File

@@ -95,6 +95,10 @@ func (b *Blogo) ServeHTTP(w http.ResponseWriter, r *http.Request) {
}
path := strings.Trim(r.URL.Path, "/")
if path == "" || path == "/" {
path = "."
}
f, err := b.files.Open(path)
if errors.Is(err, fs.ErrNotExist) {