statamic / seo-pro

An all-in-one site reporting, metadata wrangling, Open Graph managing, Twitter card making, sitemap generating, turn-key addon for Statamic.
https://statamic.com/addons/statamic/seo-pro
52 stars 34 forks source link

Add support for passing meta into view data for custom routes #255

Closed edalzell closed 1 year ago

edalzell commented 1 year ago

Closes #254

edalzell commented 1 year ago

Got a test in there @jesseleite, but it's failing because it's falling back to the home, which might be correct but not what I expected. Like that canonical_url is the home page, is that right in this case?

jesseleite commented 1 year ago

it's falling back to the home, which might be correct but not what I expected

Yep, it's by design that we want to fall back to home page data by default, as that makes for better SEO than falling back to nothing. The above commits fix this to respect your current URL (ie. when using custom routes like you are) 👍

jesseleite commented 1 year ago

^ Would just like to work out blade layout component support before we merge this is all (see failing test).