mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-26 22:04:32 +02:00
Enhance Page and Resource String()
This commit is contained in:
committed by
Bjørn Erik Pedersen
parent
fc8c5ad824
commit
4f0665f476
@@ -2013,7 +2013,11 @@ func (p *Page) RelRef(refs ...string) (string, error) {
|
||||
}
|
||||
|
||||
func (p *Page) String() string {
|
||||
if p.Path() != "" {
|
||||
return fmt.Sprintf("Page(%s)", p.Path())
|
||||
}
|
||||
return fmt.Sprintf("Page(%q)", p.title)
|
||||
|
||||
}
|
||||
|
||||
// Scratch returns the writable context associated with this Page.
|
||||
|
Reference in New Issue
Block a user