Skip to content

Commit 8bc5357

Browse files
committed
chore: autoformat with shopify liquid vscode plugin
1 parent 7aad784 commit 8bc5357

File tree

6 files changed

+107
-133
lines changed

6 files changed

+107
-133
lines changed

.devcontainer/devcontainer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
"prettier.prettier-vscode",
2121
"mhutchie.git-graph",
2222
"redhat.vscode-xml",
23-
"sissel.shopify-liquid",
23+
"shopify.theme-check-vscode",
2424
"tombi-toml.tombi"
2525
]
2626
}

.pre-commit-config.yaml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,6 @@ repos:
3131
- id: check-added-large-files
3232
args: ["--maxkb=2500"]
3333

34-
- repo: https://github.com/pre-commit/mirrors-prettier
35-
rev: v3.1.0
36-
hooks:
37-
- id: prettier
38-
types_or: ["html"]
39-
4034
- repo: local
4135
hooks:
4236
- id: frontmatter-timestamp

.prettierrc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"tabWidth": 2,
33
"useTabs": false,
4-
"printWidth": 130
4+
"printWidth": 130,
5+
"liquidSingleQuote": false
56
}

.vscode/settings.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@
77
"files.trimFinalNewlines": true,
88
"files.trimTrailingWhitespace": true,
99
"editor.tabSize": 2,
10-
"[html]": {
11-
"editor.defaultFormatter": "prettier.prettier-vscode",
12-
"editor.formatOnSave": true
13-
},
1410
"files.associations": {
1511
"*.html": "liquid"
12+
},
13+
"[liquid]": {
14+
"editor.defaultFormatter": "Shopify.theme-check-vscode",
15+
"editor.formatOnSave": true
1616
}
1717
}

src/_includes/article.html

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,22 @@
88
{% assign url = item.url %}
99
{% endif %}
1010
{% else %}
11-
{% assign url = item.url
12-
%}
11+
{% assign url = item.url %}
1312
{% if item.external %}
1413
{% assign url = item.external %}
1514
{% endif %}
1615
{% endif %}
1716

1817
<article class="d-block mb-3 pb-4">
19-
<a href="{{ url }}" {% if item.external %}target="_blank"{% endif %}>{{- item.title -}}</a>
20-
<br />
18+
<a
19+
href="{{ url }}"
20+
{% if item.external %}
21+
target="_blank"
22+
{% endif %}
23+
>
24+
{{- item.title -}}
25+
</a>
26+
<br>
2127
<span class="text-body-tertiary font-poppins fs-7">
2228
{% if item.outlet %}{{ item.outlet }} |{% endif %}
2329
{% if item.tags.size > 0 %}{{ item.tags | join: ", " }} |{% endif %}

0 commit comments

Comments
 (0)