Add Disqus support out of the box. Move template/bundle into hugolib.

This commit is contained in:
spf13
2014-04-23 02:52:01 -04:00
parent 41adafbc3e
commit 4a8de8ea46
7 changed files with 57 additions and 39 deletions

View File

@@ -20,7 +20,6 @@ import (
"strings"
"unicode"
"github.com/spf13/hugo/template/bundle"
jww "github.com/spf13/jwalterweatherman"
)
@@ -78,7 +77,7 @@ func (scp *ShortcodeWithPage) Get(key interface{}) interface{} {
type Shortcodes map[string]ShortcodeFunc
func ShortcodesHandle(stringToParse string, p *Page, t bundle.Template) string {
func ShortcodesHandle(stringToParse string, p *Page, t Template) string {
leadStart := strings.Index(stringToParse, `{{%`)
if leadStart >= 0 {
leadEnd := strings.Index(stringToParse[leadStart:], `%}}`) + leadStart
@@ -147,7 +146,7 @@ func FindEnd(str string, name string) (int, int) {
return startPos, endPos
}
func GetTemplate(name string, t bundle.Template) *template.Template {
func GetTemplate(name string, t Template) *template.Template {
if x := t.Lookup("shortcodes/" + name + ".html"); x != nil {
return x
}