diff --git a/README.md b/README.md index b7f18a5..9736c00 100644 --- a/README.md +++ b/README.md @@ -10,8 +10,6 @@ Per clonare il progetto usare $ git clone https://github.com/phc-dm/phc-server ``` - - ## Development Copiare il file `.env.dev` in `.env` per dire al server di lavorare in modalità di development e su quale indirizzo servire il sito, poi avviare il server. diff --git a/articles.go b/articles.go index ad6cace..49ada2b 100644 --- a/articles.go +++ b/articles.go @@ -197,7 +197,7 @@ func (registry *ArticleRenderer) LoadAll() ([]*Article, error) { return articles, nil } -func NewArticleRegistry(rootPath string) *ArticleRenderer { +func NewArticleRenderer(rootPath string) *ArticleRenderer { return &ArticleRenderer{ rootPath, } diff --git a/main.go b/main.go index 02ac8d4..d2a8126 100644 --- a/main.go +++ b/main.go @@ -23,11 +23,10 @@ func main() { // Static content r.Handle("/public/*", http.StripPrefix("/public", http.FileServer(http.Dir("./public")))) - r.Handle("/blog/*", http.StripPrefix("/blog", http.FileServer(http.Dir("./blog/public")))) // Templates & Renderer renderer := NewTemplateRenderer("base.html") - newsArticlesRegistry := NewArticleRegistry("./news") + newsArticlesRegistry := NewArticleRenderer("./news") // Routes r.Get("/", func(w http.ResponseWriter, r *http.Request) {