Closed mhauri closed 7 years ago
What's the reason behind Use $page->link(true) instead of $page->permaLink() ?
Didn't tested it trough, but noticed a Problem in my Blog.
As Example in my Blog I have a folder 01.blog in which i have my blog posts.
When navigated over the blog they are shown asexample.com/this-is-my-blog-post
But in the Sitemap the link is shown as example.com/blog/this-is-my-blog-post
Also the Homepage itself contains the /blog folder in the sitemap.
So example.com
is shown as example.com/blog
in the sitemap.
$page->canonical()
could be a solution, right ?
This patch is really needed to make the grav sitemap plug-in functional. Thanks @mhauri !
I've patched my local install manually. This patch will be merged anytime soon? Sorry about this dumb question, but the timeline above really make me confuse:
Thanks a lot (and sorry for any inconvenience here), guys!
I also think it should be canonical as it supports languages.
FYI: link code is simply:
public function link($include_host = false)
{
return $this->url($include_host);
}
Canonical code is:
public function canonical($include_lang = true)
{
return $this->url(true, true, $include_lang);
}
so $page->link(true)
is actually the same as $page->canonical(false)
but actually having $include_lang
true is going to give better results for multi-lang setups.