@fluid-app/fluid-cli-页面
用于 storefront Pages 的流体 CLI 插件 . fluid pages create 创建页面
与主题中自己的页面模板一起,并将两者链接,相同
作为Mist的创建页面工具进行操作.
npm install -g @fluid-app/fluid-cli @fluid-app/fluid-cli-pages
fluid login
fluid pages walk # answer questions in the terminal instead
fluid pages create --title "Spring Wellness Guide" --yes # Page + template, linked, as a draft
fluid pages create --title "Spring Wellness Guide" --theme "Maple" \
--template-from landing --publish --yes # copy another page template's Liquid, then publish
fluid pages list --status draft # --cursor pages through
fluid pages show spring-wellness-guide # id or slug
fluid pages template spring-wellness-guide # the template and its Liquid
fluid pages template spring-wellness-guide --content-file page.liquid --publish --yes
fluid pages update spring-wellness-guide --title "Spring Guide" --yes
fluid pages publish spring-wellness-guide --yes
fluid pages unpublish spring-wellness-guide --yes
fluid pages delete spring-wellness-guide --yes # keeps the template; prints its id
怎么样 create 工作内容
A Page 持有元数据( 标题、 switter、 描述、 状态) 。 看起来像什么
类似来自一个页面模板,一个主题中的液体文件. create 两者都有
并将其链接:
- 在主题中创建一个页面模板( x)
--theme,或活动主题), 以标题命名,除非您通过--template-name开始于--content-file, (中文(简体) ),--template-from,或最小标题和描述 设置。 除非你通过--blank,页上还装入主题的 样式表(其品牌样式); - 以纸作一草稿,以弹子作一钉;
- 将模板指定为页面;
- 将两者都读回确认链接;
- 通过时发布页面
--publish。 。 。 .
如果模板失败后的一个步骤, 页面草稿和模板就是 并删除错误。 他们是被保存的,他们的身份证在错误中, 当您的会话在中途过期或链接无法读取时.
assignment 结果 direct-page 当模板处于活动状态时
主题。 另一个主题的模板是 theme-scoped: 页面使用一次
主题活跃 previewPath 携带 ?theme_template_id= 所以说,你
现在可以预览它.
走过去
fluid pages walk 要求与 create一个问题
时间: 标题, swit( 从标题中建议), 模板( 以
主题的品牌风格,新和空白,或现有页面的复制件
模板,从可搜索列表中选择),以及主题(活动中的主题,或
选择另一个). 类型 < 回去的时候, > 跳过并接受默认值,或 ?
用于跳转到任何问题的菜单; Ctrl-C 停止。 直到
你确认摘要。 然后,它创建了页面 作为草稿通过相同的
步骤为 create,主动发布,打印其URL,并主动向
替换模板中的“ Liquid”从文件中取出。 它需要一个终端;在剧本中,
使用情况 create。 。 。 .
编辑模板
fluid pages template <page> --content-file <file> 将液体替换为
新版本草案; 添加 --publish 让它活下来 对于区域,设置,
和主题的其余部分, 使用 fluid themes 和主题发展文件
时间 https://docs.fluid.app/主题/概览。 。 。 .
每个命令打印 JSON; 失败打印 JSON error 显示和退出
非为零。 更改活商店前端的命令要求确认
除非你通过 --yes。 。 。 .