How can I access/edit the HTML file on Shopify?

微笑、不失礼 提交于 2020-06-13 07:07:09

问题


I know this is probably a very basic/obvious thing, but I'm new to Shopify and trying to assist a client while a colleague is on vacation. I know what I need to change and how to change it, but not how to access it. When I go to Online Store and click Edit Code, I see all the Liquid, JSON, and even CSS files, but I can't find the HTML file I need to edit, nor can I find any of the HTML I need to edit within the theme.liquid file. The resources I'm finding are all either outdated (there is no "Edit HTML/CSS" option on the dropdown anymore) or unhelpful (like this). I can see the HTML in the console and upon clicking View Page Source, but I don't know how to get to it through Shopify. I feel like I'm losing my mind because this HAS to be very simple and obvious. If someone could please tell me how to access and edit the HTML file on Shopify I would be VERY grateful!


回答1:


The html files are the liquid files.

There are no actual HTML files since this is a Shopify theme.

Depending on your theme, your files are located in:

  • theme.liquid - here are the header and footer
  • templates/*.liquid - all liquid files here are the main templates for the different pages
  • sections/*.liquid - the files here are usually used on the homepage and other pages as well
  • snippets/*.liquid - these are the reusable code snippets

So depending on your changes you will need to go through these files and update them for the specific changes.

Please have in mind that these files may be used on multiply pages and if you change one of them there is a possibility that this will affect other pages as well.



来源:https://stackoverflow.com/questions/50522677/how-can-i-access-edit-the-html-file-on-shopify

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!