Changeset 62 in code for trunk


Ignore:
Timestamp:
Apr 26, 2023, 12:40:20 PM (2 years ago)
Author:
Izuru Yakumo
Message:

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@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/cmd/aya/main.go

    r61 r62  
     1// $TheSupernovaDuo: cmd/aya/main.go,v 0.5.x 2023/4/26 8:49:6 yakumo_izuru Exp $
    12package main
    23
     
    303304func build(path string, w io.Writer, vars Vars) error {
    304305        ext := filepath.Ext(path)
    305         if ext == ".md" || ext == ".mkd" {
     306        if ext == ".md" || ext == ".mkd" || ext == ".markdown" {
    306307                return buildMarkdown(path, w, vars)
    307308        } else if ext == ".html" || ext == ".xml" {
     
    364365        rootdir := http.Dir(PUBDIR)
    365366        http.Handle("/", http.FileServer(rootdir))
     367        log.Printf("Serving %v at port 8000, see http://localhost:8000", rootdir)
    366368        log.Fatal(http.ListenAndServe(":8000", nil))
    367369}
Note: See TracChangeset for help on using the changeset viewer.