Fix non-ASCII path handling for Page resources

Fixes #4241
This commit is contained in:
Bjørn Erik Pedersen
2018-01-10 10:20:08 +01:00
parent 768ec5df9f
commit f0eecc6a4f
7 changed files with 65 additions and 33 deletions

View File

@@ -228,9 +228,9 @@ type Page struct {
permalink string
relPermalink string
// relPermalink without extension and any base path element from the baseURL.
// relative target path without extension and any base path element from the baseURL.
// This is used to construct paths in the page resources.
relPermalinkBase string
relTargetPathBase string
layoutDescriptor output.LayoutDescriptor
@@ -989,8 +989,8 @@ func (p *Page) RelPermalink() string {
return p.relPermalink
}
func (p *Page) subResourceLinkFactory(base string) string {
return path.Join(p.relPermalinkBase, base)
func (p *Page) subResourceTargetPathFactory(base string) string {
return path.Join(p.relTargetPathBase, base)
}
func (p *Page) prepareForRender(cfg *BuildCfg) error {