create-smoodly-app 0.0.18 → 0.0.20
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/package.json +1 -1
- package/templates/blank/README.md +9 -0
- package/templates/blank/package.json +1 -1
- package/templates/blank-intl/README.md +11 -0
- package/templates/blank-intl/package.json +1 -1
- package/templates/lorem/README.md +9 -0
- package/templates/lorem/components/sections/FavouriteArticles.tsx +1 -1
- package/templates/lorem/package.json +1 -1
- package/templates/lorem/smoodly/collections.ts +2 -2
- package/templates/lorem-intl/README.md +11 -0
- package/templates/lorem-intl/components/sections/FavouriteArticles.tsx +1 -1
- package/templates/lorem-intl/package.json +1 -1
- package/templates/lorem-intl/smoodly/collections.ts +2 -2
package/package.json
CHANGED
|
@@ -59,6 +59,15 @@ Globals in the admin.
|
|
|
59
59
|
|
|
60
60
|
Reseed an empty database any time with `npm run seed`.
|
|
61
61
|
|
|
62
|
+
## Moving the admin
|
|
63
|
+
|
|
64
|
+
The admin is at `/admin`. To serve it somewhere else, say `/studio`:
|
|
65
|
+
|
|
66
|
+
1. rename `app/(smoodly)/admin` to `app/(smoodly)/studio`,
|
|
67
|
+
2. set `admin: { path: "/studio" }` in `smoodly/config.ts`.
|
|
68
|
+
|
|
69
|
+
The two must agree; the admin says so when they do not.
|
|
70
|
+
|
|
62
71
|
## Editors
|
|
63
72
|
|
|
64
73
|
Anyone who may open `/admin` is a Supabase Auth user with a row in the
|
|
@@ -60,6 +60,17 @@ Globals in the admin.
|
|
|
60
60
|
|
|
61
61
|
Reseed an empty database any time with `npm run seed`.
|
|
62
62
|
|
|
63
|
+
## Moving the admin
|
|
64
|
+
|
|
65
|
+
The admin is at `/admin`. To serve it somewhere else, say `/studio`:
|
|
66
|
+
|
|
67
|
+
1. rename `app/(smoodly)/admin` to `app/(smoodly)/studio`,
|
|
68
|
+
2. set `admin: { path: "/studio" }` in `smoodly/config.ts`.
|
|
69
|
+
3. `proxy.ts`: swap `admin` in the `matcher` for the new segment (Next wants
|
|
70
|
+
the matcher as a literal, so it cannot read the config).
|
|
71
|
+
|
|
72
|
+
The two must agree; the admin says so when they do not.
|
|
73
|
+
|
|
63
74
|
## Editors
|
|
64
75
|
|
|
65
76
|
Anyone who may open `/admin` is a Supabase Auth user with a row in the
|
|
@@ -33,6 +33,15 @@ The Lorem Co. site the installer seeded is a tour of the features:
|
|
|
33
33
|
|
|
34
34
|
Reseed an empty database any time with `npm run seed`.
|
|
35
35
|
|
|
36
|
+
## Moving the admin
|
|
37
|
+
|
|
38
|
+
The admin is at `/admin`. To serve it somewhere else, say `/studio`:
|
|
39
|
+
|
|
40
|
+
1. rename `app/(smoodly)/admin` to `app/(smoodly)/studio`,
|
|
41
|
+
2. set `admin: { path: "/studio" }` in `smoodly/config.ts`.
|
|
42
|
+
|
|
43
|
+
The two must agree; the admin says so when they do not.
|
|
44
|
+
|
|
36
45
|
## Editors
|
|
37
46
|
|
|
38
47
|
Anyone who may open `/admin` is a Supabase Auth user with a row in the
|
|
@@ -14,7 +14,7 @@ export const favouriteArticlesSchema = smoodly.schema.section({
|
|
|
14
14
|
description: "Articles picked by hand, as cards.",
|
|
15
15
|
fields: {
|
|
16
16
|
heading: f.text(),
|
|
17
|
-
items: f.refList(() => articles),
|
|
17
|
+
items: f.refList(() => articles).max(6),
|
|
18
18
|
},
|
|
19
19
|
sample: { heading: "From the journal", items: [] },
|
|
20
20
|
});
|
|
@@ -17,7 +17,7 @@ export const people = smoodly.collection({
|
|
|
17
17
|
|
|
18
18
|
// Articles are served at a path that is per locale — /posts/<slug> and
|
|
19
19
|
// /fi/artikkelit/<slug> — and the Articles fixed page (components/pages/Articles.tsx) claims the same
|
|
20
|
-
// segments, which makes it the collection's index page. Tags are
|
|
20
|
+
// segments, which makes it the collection's index page. Tags are f.tags(),
|
|
21
21
|
// localized as a whole, so the Finnish row carries Finnish tags.
|
|
22
22
|
export const articles = smoodly.collection({
|
|
23
23
|
name: "articles",
|
|
@@ -34,7 +34,7 @@ export const articles = smoodly.collection({
|
|
|
34
34
|
excerpt: f.text().localized(),
|
|
35
35
|
// The article toolset: the default marks and blocks, body images and the elements.
|
|
36
36
|
body: f.richtext({ toolset: article }).localized(),
|
|
37
|
-
tags: f.
|
|
37
|
+
tags: f.tags().localized(),
|
|
38
38
|
},
|
|
39
39
|
});
|
|
40
40
|
|
|
@@ -41,6 +41,17 @@ The Lorem Co. site the installer seeded is a tour of the features:
|
|
|
41
41
|
Every page and entry exists in each locale with its own slug. Reseed an
|
|
42
42
|
empty database any time with `npm run seed`.
|
|
43
43
|
|
|
44
|
+
## Moving the admin
|
|
45
|
+
|
|
46
|
+
The admin is at `/admin`. To serve it somewhere else, say `/studio`:
|
|
47
|
+
|
|
48
|
+
1. rename `app/(smoodly)/admin` to `app/(smoodly)/studio`,
|
|
49
|
+
2. set `admin: { path: "/studio" }` in `smoodly/config.ts`.
|
|
50
|
+
3. `proxy.ts`: swap `admin` in the `matcher` for the new segment (Next wants
|
|
51
|
+
the matcher as a literal, so it cannot read the config).
|
|
52
|
+
|
|
53
|
+
The two must agree; the admin says so when they do not.
|
|
54
|
+
|
|
44
55
|
## Editors
|
|
45
56
|
|
|
46
57
|
Anyone who may open `/admin` is a Supabase Auth user with a row in the
|
|
@@ -14,7 +14,7 @@ export const favouriteArticlesSchema = smoodly.schema.section({
|
|
|
14
14
|
description: "Articles picked by hand, as cards.",
|
|
15
15
|
fields: {
|
|
16
16
|
heading: f.text(),
|
|
17
|
-
items: f.refList(() => articles),
|
|
17
|
+
items: f.refList(() => articles).max(6),
|
|
18
18
|
},
|
|
19
19
|
sample: { heading: "From the journal", items: [] },
|
|
20
20
|
});
|
|
@@ -17,7 +17,7 @@ export const people = smoodly.collection({
|
|
|
17
17
|
|
|
18
18
|
// Articles are served at a path that is per locale — /posts/<slug> and
|
|
19
19
|
// /fi/artikkelit/<slug> — and the Articles fixed page (components/pages/Articles.tsx) claims the same
|
|
20
|
-
// segments, which makes it the collection's index page. Tags are
|
|
20
|
+
// segments, which makes it the collection's index page. Tags are f.tags(),
|
|
21
21
|
// localized as a whole, so the Finnish row carries Finnish tags.
|
|
22
22
|
export const articles = smoodly.collection({
|
|
23
23
|
name: "articles",
|
|
@@ -34,7 +34,7 @@ export const articles = smoodly.collection({
|
|
|
34
34
|
excerpt: f.text().localized(),
|
|
35
35
|
// The article toolset: the default marks and blocks, body images and the elements.
|
|
36
36
|
body: f.richtext({ toolset: article }).localized(),
|
|
37
|
-
tags: f.
|
|
37
|
+
tags: f.tags().localized(),
|
|
38
38
|
},
|
|
39
39
|
});
|
|
40
40
|
|