Skip to content

Instantly share code, notes, and snippets.

Jinesh Dedhia jinesh24

Block or report user

Report or block jinesh24

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@jinesh24
jinesh24 / canonical fix
Created Jul 11, 2019
Shopify Collection Tags Duplicate Content Fix
View canonical fix
{% if template contains 'collection' and current_tags %}
<meta name="robots" content="noindex" />
<link rel="canonical" href="{{ collection.url }}" />
{% elsif template contains 'blog' and current_tags %}
<meta name="robots" content="noindex" />
<link rel="canonical" href="{{ blog.url }}" />
{% else %}
<meta name="robots" content="index,follow">
<link rel="canonical" href="{{ canonical_url }}" />
{% endif %}
You can’t perform that action at this time.