Last active
April 19, 2018 14:22
-
-
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
This file contains hidden or 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
<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