Skip to content

Instantly share code, notes, and snippets.

@jimmijazz
Created August 26, 2020 06:35
Show Gist options
  • Save jimmijazz/042ba5f206ef5c93853eab7641dbc599 to your computer and use it in GitHub Desktop.
Save jimmijazz/042ba5f206ef5c93853eab7641dbc599 to your computer and use it in GitHub Desktop.
[Shopify] Sample title tag generation with tag filtering
<title>
{{ page_title }}{% if current_tags %}{% assign current_tags_joined = current_tags | join: ', ' %} &ndash; {{ 'general.meta.tags' | t: tags: current_tags_joined }}{% endif %}{% if current_page != 1 %} &ndash; {{ 'general.meta.page' | t: page: current_page }}{% endif %}{% unless page_title contains shop.name %} &ndash; {{ shop.name }}{% endunless %}
</title>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment