- Add fsnotify for file watching in serve mode - Create watcher.go for content directory monitoring - Update serve mode to generate initial output and watch for changes - Add route to serve generated HTML files from output directory - File changes trigger automatic regeneration Co-Authored-By: Claude (glm-5) <noreply@anthropic.com>
15 lines
310 B
Go
15 lines
310 B
Go
package main
|
|
|
|
import (
|
|
"net/http"
|
|
|
|
"github.com/gorilla/mux"
|
|
)
|
|
|
|
func (s *WebServer) Routes(r *mux.Router) {
|
|
r.HandleFunc("/version", handleVersion).Methods("GET")
|
|
|
|
// Serve generated HTML files from output directory
|
|
r.PathPrefix("/").Handler(http.StripPrefix("/", http.FileServer(http.Dir(outputPath))))
|
|
}
|