Skip to main content
All CollectionsKeystoneTemplates
Keystone: Using the article template
Keystone: Using the article template
Thomas K avatar
Written by Thomas K
Updated over 2 weeks ago

Article Template Documentation

Summary

The article template is used to showcase the content of a blog post. It includes features like a Table of Contents to improve navigation and readability.


Showing a Table of Contents

Create Metafield Definition

  1. Navigate to Settings > Custom Data > Blog Posts.

  2. Click Add Definition.

  3. In the Name field, type Table of contents.

  4. Ensure the Namespace and Key field is set to custom.table_of_contents.

  5. Click Select Type and choose Single line text.

  6. Select List of values.

  7. Click Save.

Update Metafield Values

  1. Navigate to the blog post you’d like to update.

  2. Scroll to the bottom and click Show all next to metafields.

  3. Enter values for each heading you want to appear in your table of contents.

Add Block

  1. In the Shopify Theme Editor, navigate to the Blog Post Template.

  2. Click Add Block under Article Main.

  3. Search and select Table of Contents.

Update Headings

  1. In Shopify, navigate to the blog post you’d like to update.

  2. Click the Show HTML icon on your blog content.

  3. Add id="HEADING-NAME" to your heading tags. The id attribute should match the table of contents.

    • Example: <h1 id="your-heading-text">Your Heading Text</h1>.

  4. Save your changes.

Did this answer your question?