在 Shopify 中基于 GitHub 同步主题时,报错:config/settings_schema.json, Validation failed
1、在 Shopify 中基于 GitHub 同步主题时,报错:config/settings_schema.json, Validation failed。如图1
01:57:46: 已收到来自 GitHub 的模板文件 01:57:46: 已获取文件 01:57:46: 错误:config/settings_schema.json, Validation failed: Section 1: settings is required, Section 1: 'theme_name' is not a valid attribute, Section 1: 'theme_version' is not a valid attribute, Section 1: 'theme_author' is not a valid attribute, Section 1: 'theme_documentation_url' is not a valid attribute, Section 1: 'theme_support_url' is not a valid attribute 01:57:46: 0 个已成功,0 个警告,1 个已失败 01:57:46: 模板已更新!
2、原始的 Dawn 的配置如下
{ "name": "theme_info", "theme_name": "Dawn", "theme_version": "7.0.1", "theme_author": "Shopify", "theme_documentation_url": "https://help.shopify.com/manual/online-store/themes", "theme_support_url": "https://support.shopify.com/" }
3、编辑后报错的配置如下
{ "name": "dark", "theme_name": "Dark", "theme_version": "0.0.1", "theme_author": "Qiang Wang", "theme_documentation_url": "https://www.shuijingwanwq.com/", "theme_support_url": "https://www.shuijingwanwq.com/" }
4、参考:https://shopify.dev/themes/getting-started/create#step-7-test-your-connection 。更新 theme_name 值以匹配您使用 Shopify CLI 为模板指定的名称。修改为:dawn-20221011。
{ "name": "theme_info", "theme_name": "dawn-20221011", "theme_version": "0.0.1", "theme_author": "Qiang Wang", "theme_documentation_url": "https://help.shopify.com/manual/online-store/themes", "theme_support_url": "https://www.shuijingwanwq.com/" }
5、Git 提交与推送,成功。如图2
6、单击自定义以打开主题编辑器。 在存储库和分支名称旁边,单击菜单按钮⋯。 在菜单中,主题名称应与您在 settings_schema.json 中输入的值匹配。其值为:dawn-20221011 0.0.1 由 Qiang Wang 设计并提供支持。如图3
近期评论