Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a canonical option to page helper #9

Open
gabriel-cardoso opened this issue Sep 7, 2015 · 1 comment
Open

Add a canonical option to page helper #9

gabriel-cardoso opened this issue Sep 7, 2015 · 1 comment

Comments

@gabriel-cardoso
Copy link
Contributor

We'd like to write something like that

page :product, resource: product
page :product_in_category, resource: product, path: product_category_path(category, path), canonical: product_path(product)

This should add a meta tag <link rel="canonical" href="#{ product_path(product) }" /> to both pages.

When option canonical is set, we should check that the given page really exists in the skeleton to avoid pointing on a 404

@gabriel-cardoso
Copy link
Contributor Author

Canonical URL's should be absolute

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant