diff options
-rw-r--r-- | hugolib/node.go | 2 | ||||
-rw-r--r-- | hugolib/site.go | 10 | ||||
-rw-r--r-- | target/htmlredirect.go | 6 |
3 files changed, 9 insertions, 9 deletions
diff --git a/hugolib/node.go b/hugolib/node.go index dcbf0d146..c335b72df 100644 --- a/hugolib/node.go +++ b/hugolib/node.go @@ -139,7 +139,7 @@ func (n *Node) RelRef(ref string) (string, error) { type URLPath struct { URL string - Permalink template.HTML + Permalink string Slug string Section string } diff --git a/hugolib/site.go b/hugolib/site.go index fdc615bf3..2e07091fb 100644 --- a/hugolib/site.go +++ b/hugolib/site.go @@ -889,7 +889,7 @@ func (s *Site) RenderAliases() error { if err != nil { return err } - if err := s.WriteDestAlias(a, template.HTML(plink)); err != nil { + if err := s.WriteDestAlias(a, plink); err != nil { return err } } @@ -1386,11 +1386,11 @@ func (s *Site) Stats() { func (s *Site) setURLs(n *Node, in string) { n.URL = helpers.URLizeAndPrep(in) n.Permalink = s.permalink(n.URL) - n.RSSLink = s.permalink(in + ".xml") + n.RSSLink = template.HTML(s.permalink(in + ".xml")) } -func (s *Site) permalink(plink string) template.HTML { - return template.HTML(s.permalinkStr(plink)) +func (s *Site) permalink(plink string) string { + return s.permalinkStr(plink) } func (s *Site) permalinkStr(plink string) string { @@ -1572,7 +1572,7 @@ func (s *Site) WriteDestPage(path string, reader io.Reader) (err error) { return s.PageTarget().Publish(path, reader) } -func (s *Site) WriteDestAlias(path string, permalink template.HTML) (err error) { +func (s *Site) WriteDestAlias(path string, permalink string) (err error) { jww.DEBUG.Println("creating alias:", path) return s.AliasTarget().Publish(path, permalink) } diff --git a/target/htmlredirect.go b/target/htmlredirect.go index 41fd42a10..75f3b088e 100644 --- a/target/htmlredirect.go +++ b/target/htmlredirect.go @@ -26,7 +26,7 @@ func init() { type AliasPublisher interface { Translator - Publish(string, template.HTML) error + Publish(string, string) error } type HTMLRedirectAlias struct { @@ -107,10 +107,10 @@ func (h *HTMLRedirectAlias) Translate(alias string) (aliasPath string, err error } type AliasNode struct { - Permalink template.HTML + Permalink string } -func (h *HTMLRedirectAlias) Publish(path string, permalink template.HTML) (err error) { +func (h *HTMLRedirectAlias) Publish(path string, permalink string) (err error) { if path, err = h.Translate(path); err != nil { jww.ERROR.Printf("%s, skipping.", err) return nil |