mirror of
https://github.com/gohugoio/hugo.git
synced 2025-04-27 22:21:07 +03: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:
parent
c8d3124dde
commit
524eb16686
8 changed files with 105 additions and 63 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue