Created
June 1, 2022 08:25
-
-
Save vevgeniy85/d0f16866785cb876992e38f8deda05e1 to your computer and use it in GitHub Desktop.
Shopify - shortcode-readmore
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{%- comment -%} | |
@param before_readmore {Boolean} | |
Output the contents of the text before the readmore shortcode | |
{%- endcomment -%} | |
{%- assign readmore_split = text | split: '<!-- more -->' -%} | |
{%- if before_readmore -%}{{- readmore_split[0] -}}{%- else -%}{{- readmore_split[1] -}}{%- endif -%} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment