Closed danielhollas closed 2 years ago
Maybe hint here (though we probably cannot use this in the Sitemap context as it would redirect the Sitemap presenter) https://doc.nette.org/en/3.0/presenters#toc-canonization
Though maybe we should just use $this->link()
instead of $this->absoluteLink()
?
https://doc.nette.org/en/3.0/presenters#toc-creating-links
Okay, so absoluteLink()
is defined in app/Components/ControlTrait.php
, and it seems we "just" need to pass in the Block and Schema objects as additional arguments.
Currently, Google ignores most of our sitemap because we do not provide canonical URLs for video pages.
We're using the Cartographer library inside a
Sitemap.php
presenter. Not sure how easy is to get canonical URLs from there.If it's not easy, maybe we should just generate a static sitemap (and have a command to regenerate it when needed). Though that's a little dangerous.