Skip to content

Instantly share code, notes, and snippets.

@danhalliday
Last active April 19, 2018 14:22
Show Gist options
  • Save danhalliday/cc6932c7287dd1d3fc92ea64422f7597 to your computer and use it in GitHub Desktop.
Save danhalliday/cc6932c7287dd1d3fc92ea64422f7597 to your computer and use it in GitHub Desktop.
Hack to fix heading levels in Shopify-generated article content when using a Heading 1 for the page title
<div class="article">
<h1 class="article-title">
{{ article.title }}
</h1>
<div class="article-body">
{{ article.content | replace: "<h3>", "<h4>", | replace: "<h2>", "<h3>" | replace: "<h1>", "<h2>" }}
</div>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment