mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-29 22:29:56 +02:00
@@ -53,7 +53,7 @@ func (a aliasHandler) renderAlias(permalink string, p page.Page) (io.Reader, err
|
||||
if ps, ok := p.(*pageState); ok {
|
||||
base, templateDesc = ps.GetInternalTemplateBasePathAndDescriptor()
|
||||
}
|
||||
templateDesc.Layout = ""
|
||||
templateDesc.LayoutFromUser = ""
|
||||
templateDesc.Kind = ""
|
||||
templateDesc.OutputFormat = output.AliasHTMLFormat.Name
|
||||
|
||||
|
@@ -538,6 +538,7 @@ title: p1
|
||||
-- content/p1/c.html --
|
||||
<p>c</p>
|
||||
-- layouts/_default/single.html --
|
||||
Path: {{ .Path }}|{{.Kind }}
|
||||
|{{ (.Resources.Get "a.html").RelPermalink -}}
|
||||
|{{ (.Resources.Get "b.html").RelPermalink -}}
|
||||
|{{ (.Resources.Get "c.html").Publish }}
|
||||
|
@@ -482,12 +482,12 @@ func (po *pageOutput) GetInternalTemplateBasePathAndDescriptor() (string, tplimp
|
||||
f := po.f
|
||||
base := p.PathInfo().BaseReTyped(p.m.pageConfig.Type)
|
||||
return base, tplimpl.TemplateDescriptor{
|
||||
Kind: p.Kind(),
|
||||
Lang: p.Language().Lang,
|
||||
Layout: p.Layout(),
|
||||
OutputFormat: f.Name,
|
||||
MediaType: f.MediaType.Type,
|
||||
IsPlainText: f.IsPlainText,
|
||||
Kind: p.Kind(),
|
||||
Lang: p.Language().Lang,
|
||||
LayoutFromUser: p.Layout(),
|
||||
OutputFormat: f.Name,
|
||||
MediaType: f.MediaType.Type,
|
||||
IsPlainText: f.IsPlainText,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -495,8 +495,8 @@ func (p *pageState) resolveTemplate(layouts ...string) (*tplimpl.TemplInfo, bool
|
||||
dir, d := p.GetInternalTemplateBasePathAndDescriptor()
|
||||
|
||||
if len(layouts) > 0 {
|
||||
d.Layout = layouts[0]
|
||||
d.LayoutMustMatch = true
|
||||
d.LayoutFromUser = layouts[0]
|
||||
d.LayoutFromUserMustMatch = true
|
||||
}
|
||||
|
||||
q := tplimpl.TemplateQuery{
|
||||
|
Reference in New Issue
Block a user