You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 19, 2019. It is now read-only.
When visiting those urls, the canonical would be the requested URL, instead of /new-parent/lorem-ipsum. Shouldn't the canonical URL be $article->url instead of request()->url()?
If I'm wrong or just clueless; feel free to close the issue 😉
The text was updated successfully, but these errors were encountered:
I just realized that @yield('canonical', request()->url()) means you can do @section('canonical', $article->url) from the article blade template. Which is how you guys solved it. 😎
Thanks for open sourcing Blender, there is a lot to learn here! 🛐
As I was curious how you guys were solving the canonical meta tag and if you were using canonical redirects.
I noticed you guys use
request()->url()
as the canonical URL (https://github.com/spatie/blender/blob/master/resources/views/front/layouts/partials/head/meta.blade.php). Besides that also the last slug of an article is used to find the article in the database (https://github.com/spatie/blender/blob/master/app/Http/Controllers/Front/ArticleController.php). So if the parent of the article changes, then you'd have the following./old-parent/lorem-ipsum
/new-parent/lorem-ipsum
When visiting those urls, the canonical would be the requested URL, instead of /new-parent/lorem-ipsum. Shouldn't the canonical URL be
$article->url
instead ofrequest()->url()
?If I'm wrong or just clueless; feel free to close the issue 😉
The text was updated successfully, but these errors were encountered: