1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Shopifyのテーマの編集方法 ~随時更新~

Posted at

自分のメモ用ですが、参考になれば幸いです.

フォルダ構成

上から順に大きいコンポーネント. 拡張子liquidはrubyの文法で書かれています.
*初めてや!って人はrailsいじってからやるといいかも。
Layout
Template
Section
Snippet

Javascript

Assets配下に設置
以下でinclude

<script src="{{ 'header_common.js' | asset_url }}" defer="defer"></script>

CSS

Assets配下に設置
以下でinclude

{{ 'header.scss' | asset_url  | stylesheet_tag }}

テーマのCSSを変えたい

プレビュー表示から、編集したい要素のclassを探す
theme.scss.liquid内で該当クラスを探す
中身をいじる!

テンプレート

自分でテンプレートを作ってもOK.
その際は、下記のようにすると適応できる。
この場合は、sectionフォルダから該当ファイルがあれば、見つけてレンダリング.

{% section 'header' %}
1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?