Skip to content

Instantly share code, notes, and snippets.

@lewsea
Created November 18, 2022 06:26
Show Gist options
  • Select an option

  • Save lewsea/a3e2ad73db358e009255d4957585e04a to your computer and use it in GitHub Desktop.

Select an option

Save lewsea/a3e2ad73db358e009255d4957585e04a to your computer and use it in GitHub Desktop.
shop dup content fix
{% if collection.current_vendor %}
<link rel="canonical" href="{{shop.url}}/collections/{{ collection.current_vendor }}" />
{% elsif template contains 'collection' %}
<link rel="canonical" href="{{shop.url}}{{collection.url}}" />
{% else %}
<link rel="canonical" href="{{canonical_url}}" />
{% endif %}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment