ref: 8a5dd06ad0edde01b35c24b2cf50e0e50cba1290
parent: ade2ca6072fec85b4b098010d76844e985166a98
author: spf13 <[email protected]>
date: Mon Nov 3 19:44:30 EST 2014
Use page.Markup to determine which PageHandler to use if it's set.
--- a/hugolib/site.go
+++ b/hugolib/site.go
@@ -428,7 +428,12 @@
func pageConverter(s *Site, pages <-chan *Page, results HandleResults, wg *sync.WaitGroup) {
defer wg.Done()
for page := range pages {
- h := FindHandler(page.File.Extension())
+ var h Handler
+ if page.Markup != "" {
+ h = FindHandler(page.Markup)
+ } else {
+ h = FindHandler(page.File.Extension())
+ }
if h != nil {
h.Convert(page, s, results)
}
@@ -438,8 +443,6 @@
func fileConverter(s *Site, files <-chan *source.File, results HandleResults, wg *sync.WaitGroup) {
defer wg.Done()
for file := range files {
- fmt.Println(file.Path())
- //Handling short codes prior to Conversion to HTML
h := FindHandler(file.Extension())
if h != nil {
h.Convert(file, s, results)