Skip to content

Instantly share code, notes, and snippets.

@odessy
Last active June 14, 2024 15:17
Show Gist options
  • Save odessy/78d232f313493336d7e86b9e0f54e5a5 to your computer and use it in GitHub Desktop.
Save odessy/78d232f313493336d7e86b9e0f54e5a5 to your computer and use it in GitHub Desktop.
Pages URL for author handle
{% assign author_handle = article.author | handle %}
"url": {{ shop.url | append: '/pages/' | append: author_handle | json }}
{% assign author_handle = article.author | handle %}
{% if pages[author_handle] != blank %}
<a href="{{ pages[author_handle].url }}">
{% endif %}
<span class="strong">{{ article.author }}</span>
{% if pages[author_handle] != blank %}
</a>
{% endif %}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment