mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-17 21:01:26 +02:00
Initial Handler Architecture WIP
This commit is contained in:
@@ -400,6 +400,14 @@ func (s *Site) CreatePages() error {
|
||||
func sourceReader(s *Site, files <-chan *source.File, results chan<- pageResult, wg *sync.WaitGroup) {
|
||||
defer wg.Done()
|
||||
for file := range files {
|
||||
// TODO: Switch here on extension
|
||||
h := handlers.Handler(file.Extension())
|
||||
if h != nil {
|
||||
|
||||
} else {
|
||||
jww.ERROR.Println("Unsupported File Type", file.Path())
|
||||
}
|
||||
|
||||
page, err := NewPage(file.Path())
|
||||
if err != nil {
|
||||
results <- pageResult{nil, err}
|
||||
|
Reference in New Issue
Block a user