mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-16 20:53:59 +02:00
node to page: Handle URLs
This includes removing the error return value from Permalink and RelPermalink. We ignore that error all over the place, so we might as well remove it. Updates #2297
This commit is contained in:
@@ -99,7 +99,7 @@ func (s *Site) renderPaginator(p *Page) error {
|
||||
|
||||
aliasPath := p.addLangPathPrefix(helpers.PaginateAliasPath(path.Join(p.sections...), 1))
|
||||
//TODO(bep) np node.permalink
|
||||
link, _ := p.Permalink()
|
||||
link := p.Permalink()
|
||||
s.writeDestAlias(aliasPath, link, nil)
|
||||
|
||||
pagers := p.paginator.Pagers()
|
||||
@@ -144,6 +144,7 @@ func (s *Site) renderRSS(p *Page) error {
|
||||
// TODO(bep) np check RSS titles
|
||||
// TODO(bep) np check RSS page limit, 50?
|
||||
rssNode := p.copy()
|
||||
rssNode.Kind = kindRSS
|
||||
|
||||
// TODO(bep) np todelido URL
|
||||
rssURI := s.Language.GetString("rssURI")
|
||||
@@ -248,10 +249,8 @@ func (s *Site) renderAliases() error {
|
||||
continue
|
||||
}
|
||||
|
||||
plink, err := p.Permalink()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
plink := p.Permalink()
|
||||
|
||||
for _, a := range p.Aliases {
|
||||
if err := s.writeDestAlias(a, plink, p); err != nil {
|
||||
return err
|
||||
|
Reference in New Issue
Block a user