从博客文章中删除作者的姓名

提示:DebutMinimal 在模板设置中提供删除作者的选项。访问模板编辑器并取消选中该选项即可在“博客”和“文章”分区中显示作者。

备注:本教程的步骤将根据您使用的是分区模板还是未分区模板而有所不同。分区模板支持通过拖放来安排主页的布局,未分区模板则不支持。

如果想了解您的模板是否支持分区,请转到模板的编辑代码页面。如果 Sections 目录中有文件,您则正在使用已分区模板。未分区模板是在 2016 年 10 月之前发布的,并且 Sections 目录中没有文件。

如果您使用已分区模板,请点击 Sectioned themes(已分区模板)按钮并按照说明进行操作。如果您使用较旧的未分区模板,请点击 Non-sectioned themes(未分区模板)按钮并按照说明进行操作。

本页相关主题

删除作者的姓名

若要删除博客作者的姓名,您需要编辑 blog.liquidarticle-template.liquid 模板中的 Liquid。如果您使用的是 Boundless,则需要编辑 blog.liquidarticle.liquid 模板中的 Liquid。

  1. Templates 文件夹中,点击 blog.liquid

  2. 在电脑上使用 ctrl + F 或在 Mac 上使用 command + F 来找到此 Liquid 标记并将其删除:

{{ article.author }}
For **Simple** and **Supply**, the author and date share the same liquid tag. To remove both, use `ctrl` + `F` on a PC or `command` + `F` on a Mac to locate this Liquid tag and delete it:
{{ 'blogs.article.author_on_date_html' | t: author: author, date: date }}
If you want to keep only the date, then replace the code above with:
{{ date }}
  1. 点击保存

  2. Sections 文件夹中,点击 article-template.liquid。对于 Boundless,请在 Templates 文件夹中点击 article.liquid

  3. 在电脑上使用 ctrl + F 或在 Mac 上使用 command + F 来找到此 Liquid 标记并将其删除:

{{ article.author }}
For **Simple** and **Supply**, the article author and article date share the same liquid tag. To remove both, use `ctrl` + `F` on a PC or `command` + `F` on a Mac to locate this Liquid tag and delete it:
{{ 'blogs.article.author_on_date_html' | t: author: author, date: date }}
If you want to keep only the date, then replace the code above with:
{{ date }}
  1. 点击保存

准备好开始使用 Shopify 进行销售了吗?

免费试用