Mercurial > yakumo_izuru > aya
changeset 61:e8f54da51137 draft
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 <yakumo.izuru@chaotic.ninja>
author | yakumo.izuru |
---|---|
date | Wed, 26 Apr 2023 12:40:20 +0000 |
parents | cf7277e42ece |
children | 2d9f9b32ae1f |
files | cmd/aya/main.go |
diffstat | 1 files changed, 3 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/cmd/aya/main.go Fri Apr 21 23:06:28 2023 +0000 +++ b/cmd/aya/main.go Wed Apr 26 12:40:20 2023 +0000 @@ -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 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 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)) }