@fluid-app/fluid-cli-theme-dev 0.1.189 → 0.1.191
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.mjs +47 -0
- package/dist/index.mjs.map +1 -1
- package/dist/skills/themes-review/SKILL.md +13 -1
- package/package.json +1 -1
|
@@ -57,6 +57,11 @@ my-theme/
|
|
|
57
57
|
├── cart_page/default/index.liquid
|
|
58
58
|
├── collection/default/index.liquid
|
|
59
59
|
├── collection_page/default/index.liquid
|
|
60
|
+
├── category/default/index.liquid
|
|
61
|
+
├── category_page/default/index.liquid
|
|
62
|
+
├── post/default/index.liquid
|
|
63
|
+
├── post_page/default/index.liquid
|
|
64
|
+
├── shop_page/default/index.liquid
|
|
60
65
|
├── enrollment_pack/default/index.liquid
|
|
61
66
|
├── join_page/default/index.liquid
|
|
62
67
|
├── page/default/index.liquid
|
|
@@ -90,7 +95,7 @@ my-theme/
|
|
|
90
95
|
|
|
91
96
|
## Directory & file structure — validate first
|
|
92
97
|
|
|
93
|
-
Before reading any Liquid, walk the repo root. `fluid theme lint --json`
|
|
98
|
+
Before reading any Liquid, walk the repo root. `fluid theme lint --json` checks schema JSON and section references, and warns about routed page types with no template (`target.kind: "template"`). It doesn't enforce the rest of the layout. The reviewer does.
|
|
94
99
|
|
|
95
100
|
A valid theme is recognized by the presence of an `assets/` or `config/` directory. In practice every published theme has `assets/`, `config/`, `layouts/`, and the page-type and section folders below.
|
|
96
101
|
|
|
@@ -100,6 +105,7 @@ A valid theme is recognized by the presence of an `assets/` or `config/` directo
|
|
|
100
105
|
| ----------------------------- | --------------------------------------- | ---------------------------------------------------------------------- | --------------------------------------------- |
|
|
101
106
|
| `config/settings_schema.json` | `blocker` for any new theme | Theme-wide settings. Even an empty `[]` is acceptable; absence is not. |
|
|
102
107
|
| `layouts/theme.liquid` | `blocker` if the theme renders any page | At least one layout must exist for pages to render. |
|
|
108
|
+
| `{page_type}/default/index.liquid` for every routed page type | `blocker` if the store uses that page type, `should` otherwise | Routed types: `home_page`, `shop_page`, `product`, `collection`, `collection_page`, `category`, `category_page`, `post`, `post_page`, `page`, `enrollment_pack`, `library`, `medium`, `cart_page`, `join_page`. With no template, Fluid shows the home page at that URL (HTTP 200, `request.page_type` `home_page`, `request.path` `/home`). Fix it by adding the template. Never redirect, meta-refresh, or `location.replace` from `layouts/theme.liquid`. |
|
|
103
109
|
| `assets/` | `should` | Almost every theme needs at least images. |
|
|
104
110
|
| `locales/en.json` | `should` | If the theme uses `{{ 'foo' | t }}`translations anywhere, this is`blocker`. |
|
|
105
111
|
| `cover.png` | `nit` | Used by the editor as the theme thumbnail. |
|
|
@@ -210,6 +216,12 @@ From the theme repo root, this gives a one-shot health view:
|
|
|
210
216
|
[ -f config/settings_schema.json ] && echo "OK config/settings_schema.json" || echo "MISSING config/settings_schema.json"
|
|
211
217
|
[ -f layouts/theme.liquid ] && echo "OK layouts/theme.liquid" || echo "MISSING layouts/theme.liquid"
|
|
212
218
|
|
|
219
|
+
# Routed page types with no template (each one shows the home page instead)
|
|
220
|
+
for t in home_page shop_page product collection collection_page category category_page \
|
|
221
|
+
post post_page page enrollment_pack library medium cart_page join_page; do
|
|
222
|
+
ls "$t"/*/index.liquid >/dev/null 2>&1 || echo "NO TEMPLATE $t"
|
|
223
|
+
done
|
|
224
|
+
|
|
213
225
|
# Sections without schemas
|
|
214
226
|
for f in sections/*/index.liquid; do
|
|
215
227
|
grep -q '{% schema %}' "$f" || echo "NO SCHEMA $f"
|