bigcommercestencil-compiler

BigCommerce Stencil CLI


I'm new to Stencil CLI. I recently install the same and noticed after some digging that the .stencil file is now deprecated but have no idea how to use it's replacements, which I assume is config.stencil.json and secrets.stencil.json. I am following this tutorial: https://www.youtube.com/watch?v=ZwrVN5QrEZY&t=20s

Anyone with some idea on how use them to create custom pages?


Solution

  • You would follow the same exact setup, just put the page template in the config.stencil.json file.

    This file might look something like this:

    {
      "normalStoreUrl": "https://store-abcde12345.mybigcommerce.com",
      "port": 3000,
      "customLayouts": {
        "brand": {},
        "category": {},
        "page": {
          "about-us": "/about-us"
        },
        "product": {}
      }
    }
    

    The secrets.stencil.json file only contains the API token.

    {
      "accessToken": "tokenhere"
    }