BigCommerce Stencil CLI

BigCommerce Stencil CLI

我是 Stencil CLI 的新手。我最近安装了同样的东西,经过一番挖掘发现 .stencil 文件现在已被弃用,但不知道如何使用它的替代品,我假设是 config.stencil.json 和 secrets.stencil.json。我正在学习本教程:https://www.youtube.com/watch?v=ZwrVN5QrEZY&t=20s

有人知道如何使用它们来创建自定义页面吗?

您将遵循完全相同的设置,只需将页面模板放入 config.stencil.json 文件。

此文件可能如下所示:

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

secrets.stencil.json 文件仅包含 API 标记。

{
  "accessToken": "tokenhere"
}