configuration - shopify 中的“为配置添加主题设置” - 错误消息“意外令牌”不断出现?
问题描述
我正在按照 shopify 开发人员的说明为我的网站创建“您是如何听说我们的表单字段”的。仅供参考,我在 Mac 上使用 safari。一切正常,直到我进入“为配置添加主题设置”的步骤。在配置中。settings_schema-json 目录下,当前代码(下)已经存在:
[
{
"name": "theme_info",
"theme_name": "Themekit template theme",
"theme_version": "1.0.0",
"theme_author": "Shopify",
"theme_documentation_url": "https:\/\/github.com\/Shopify\/themekit",
"theme_support_url": "https:\/\/github.com\/Shopify\/themekit\/issues"
}
]
我正在尝试使用下面从 shopify 开发人员粘贴的代码添加到该代码中,我被告知将其粘贴到右大括号(上图)下方的新行上。但是每次我这样做并点击保存时,都会出现两条错误消息(请参阅帖子底部的截图)。消息显示“错误阻止了 settings_schema.json 被保存”和“无效 JSON:意外令牌。” 有人知道这里出了什么问题吗?我将非常感激,因为我是编码新手,这是我第一次尝试对我的网站进行任何更改!
谢谢,科斯莫。
{
"name": "Hear About Us",
"settings": [
{
"type": "text",
"id": "hau_form_options",
"label": "Form options",
"default": "Facebook, Twitter, Google, Instagram, Youtube",
"info": "Separate each option with a comma"
},
{
"type": "header",
"content": "Form validation"
},
{
"type": "checkbox",
"id": "hau_form_validation",
"label": "Enable form validation",
"default": true
},
{
"type": "text",
"id": "hau_error_message",
"label": "Error message",
"info": "The error message that is displayed when no selection is made",
"default": "Please select an option below"
},
{
"type": "text",
"id": "hau_error_message_other",
"label": "Other field error message",
"info": "The error message that is displayed when there is no input in the 'Other' field",
"default": "Please fill the text field below"
},
{
"type": "header",
"content": "Error styling"
},
{
"type": "color",
"id": "hau_error_color",
"label": "Color",
"default": "#ff0000"
}
]
},
解决方案
推荐阅读
- node.js - 有没有办法判断该进程是第一次启动还是由于更改而被nodemon重新启动?
- javascript - 文本区域在 ReactJS 中显示不正确的字符数
- docker - k0s 是否支持开箱即用的 docker
- reactjs - 为配备 React Router 的应用程序构建 PrivateRoute 时,Object() 不是函数
- linux - 将 systemd 计时器设置为每 90 秒运行一次
- html - HTML超链接在CSS中使用“位置:相对,上,左”属性时变成普通文本
- apache-spark - 读取过去 2 小时在 Pypark 中创建的镶木地板文件
- javascript - 使用 Material-UI 进行 React 钩子表单验证
- reactjs - 更新 ScheduleComponent 中的字段后,选择处理程序在错误的字段键 (id) 下返回 EndTime 日期
- java - 使用 .next().get 时,Java LinkedList 不会从对象打印变量