From 55a4f77727ae101cd717a14b1739689b7dbb1c0c Mon Sep 17 00:00:00 2001 From: Izuru Yakumo Date: Wed, 26 Apr 2023 09:40:20 -0300 Subject: [PATCH] Be more verbose with servePubDir(), add an additional markdown file extension, granted it's rare for someone to use it... Signed-off-by: Izuru Yakumo --- cmd/aya/main.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cmd/aya/main.go b/cmd/aya/main.go index cb2a5a6..ef290c0 100644 --- a/cmd/aya/main.go +++ b/cmd/aya/main.go @@ -1,3 +1,4 @@ +// $TheSupernovaDuo: cmd/aya/main.go,v 0.5.x 2023/4/26 8:49:6 yakumo_izuru Exp $ package main import ( @@ -302,7 +303,7 @@ func buildRaw(path string, w io.Writer) error { func build(path string, w io.Writer, vars Vars) error { ext := filepath.Ext(path) - if ext == ".md" || ext == ".mkd" { + if ext == ".md" || ext == ".mkd" || ext == ".markdown" { return buildMarkdown(path, w, vars) } else if ext == ".html" || ext == ".xml" { return buildHTML(path, w, vars) @@ -363,6 +364,7 @@ func buildAll(watch bool) { func servePubDir() { rootdir := http.Dir(PUBDIR) http.Handle("/", http.FileServer(rootdir)) + log.Printf("Serving %v at port 8000, see http://localhost:8000", rootdir) log.Fatal(http.ListenAndServe(":8000", nil)) } -- 2.43.0