# Structured content in Blog posts

**URL:** <https://forum.builder.io/t/structured-content-in-blog-posts/1732>\
**Category:** Shopify\
**Tags:** shopify\
**Created:** [February 8, 2022, 4:07pm UTC](https://forum.builder.io/t/structured-content-in-blog-posts/1732 "2022-02-08T16:07:58Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![maddy](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.builder.io/maddy/32/11_2.png) [@maddy](https://forum.builder.io/u/maddy)\
**Post date:** [February 8, 2022, 4:07pm UTC](https://forum.builder.io/t/structured-content-in-blog-posts/1732/1 "2022-02-08T16:07:58Z")

</div>

This post will go over creating a blog template for a list of recipes that have structured content in a way that is SEO friendly and complies to liquid correctly from Builder.

For this example, we chose metafields because they are available on Shopify’s server. When Shopify’s server renders the hosted page, it can access the metafields through the liquid (which is what Builder complies to). We are using a custom metafields app (Easy Custom Metafields), but, you can also use the admin API to define these metafields.

 ![Screen Shot 2022-02-08 at 10.12.17 AM](https://us1.discourse-cdn.com/flex020/uploads/builder/original/2X/e/e9707e677eb56793a8e011a6cc7eba4ad1024841.png)

After defining the metafields, navigate to the article tab in the custom metafields app. We’ve added ingredients, name, and image. `{"ingredients": ["foo", "bar"], "name": "test", "image": "URL"}`

 ![Screen Shot 2022-02-08 at 10.13.21 AM](https://us1.discourse-cdn.com/flex020/uploads/builder/original/2X/4/4271d0d10722b5d1477f6c57a316f85da4f465d6.png)

Now in Builder, select Blog Posts page from page types in the content list → + New → Create a new blog posts page. With your new blog posts page open in the editor, select the options tab → show advanced → edit bootstrap code (this is where Builder reads the data from the Shopify liquid).

 ![Screen Shot 2022-02-08 at 10.14.40 AM](https://us1.discourse-cdn.com/flex020/uploads/builder/original/2X/e/eb49687dce4ca0b31420ef95eb7405453354a590.png)

In the bootstrap code, locate the line `window.BuilderJsonData['article'] = {{ article | json }}` and replace it with

```auto
window.BuilderJsonData['article'] = Object.assign({{ article | json}}, {
            metafields: {
                  global: {
                        content: {
                              value: {{ article.metafields["global"]["content"] }}
                        }
                  }
            }
      });

```

This will read the metafields and pass it in the context to Builder. Now you can drag and drop a text block onto your page → open the data tab → + new binding → get `text` from `context.liquid.get('article.metafields.global.content.value.name', state)`. Now, publish your entry staged to get the bootstap data. Once you refresh the editor, the name will display.

You can repeat the bindings on new text blocks for other metafields like ingredients and image. The steps to display ingredients is slightly different than displaying the name. You can select your new text block and add `context.liquid.get('article.metafields.global.content.value.ingredients', state)` in the repeat for each section in the data tab. You’ll now see your text block repeating for all of your ingredients.

Now, select command + E to open the json editor so we can define the item.name within the repeat. You’ll see the repeat you just added, `"collection": "context.liquid.get('article.metafields.global.content.value.ingredients', state)"`. Below this, add `"itemName": "item"`.

 ![Screen Shot 2022-02-08 at 11.03.07 AM](https://us1.discourse-cdn.com/flex020/uploads/builder/original/2X/4/45fa3dae8d9c9efb706093f20702de9f9866ea51.png)

Exit the json editor and with your repeating text block still selected choose + new binding in the data tab and get `text` from `context.liquid.get('item', state)`.

 ![Screen Shot 2022-02-08 at 10.50.47 AM](https://us1.discourse-cdn.com/flex020/uploads/builder/original/2X/6/6a77c07741e190d80d47eb502bd248193d7b9495.jpeg)
