Add custom protocol support in Permalink

This commit is contained in:
Bjørn Erik Pedersen
2017-03-23 20:05:10 +01:00
parent 8bcc08e3b0
commit d851d6b98f
9 changed files with 171 additions and 37 deletions

View File

@@ -862,7 +862,12 @@ func (p *Page) initURLs() error {
p.outputFormats = p.s.outputFormats[p.Kind]
}
rel := p.createRelativePermalink()
p.permalink = p.s.permalink(rel)
var err error
p.permalink, err = p.s.permalinkForOutputFormat(rel, p.outputFormats[0])
if err != nil {
return err
}
rel = p.s.PathSpec.PrependBasePath(rel)
p.relPermalink = rel
p.layoutDescriptor = p.createLayoutDescriptor()