@sveltia/cms 0.1.7 → 0.2.0
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/README.md +40 -17
- package/dist/sveltia-cms.js +242 -242
- package/package.json +8 -8
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Sveltia CMS
|
|
2
2
|
|
|
3
|
-
Sveltia CMS is a Git-based lightweight headless CMS partially compatible with [Netlify/Decap CMS](https://decapcms.org/). You can use it with any static site generator, such as SvelteKit, Next.js and Hugo,
|
|
3
|
+
Sveltia CMS is a Git-based lightweight headless CMS partially compatible with [Netlify/Decap CMS](https://decapcms.org/). You can use it with any static site generator, such as SvelteKit, Next.js and Hugo, to manage the content as static files on a Git repository. The product is now in public beta, with more features to come.
|
|
4
4
|
|
|
5
5
|
<br>
|
|
6
6
|
|
|
@@ -14,6 +14,12 @@ Sveltia CMS is a Git-based lightweight headless CMS partially compatible with [N
|
|
|
14
14
|
|
|
15
15
|
## Features
|
|
16
16
|
|
|
17
|
+
Sveltia CMS is a Git-based lightweight headless CMS, which means:
|
|
18
|
+
|
|
19
|
+
- Git-based: Your content is saved as static JSON, YAML or TOML files on a Git repository. No database or API is involved.
|
|
20
|
+
- Lightweight: The app is compiled as a single small JavaScript file served via a CDN. You don’t have to sign up for a service or install the software.
|
|
21
|
+
- Headless: The CMS only takes care of raw data. You can read it and render the final content with your favourite framework.
|
|
22
|
+
|
|
17
23
|
Here are some highlights mainly compared to Netlify/Decap CMS:
|
|
18
24
|
|
|
19
25
|
### Compatible with Netlify/Decap CMS
|
|
@@ -26,6 +32,7 @@ Here are some highlights mainly compared to Netlify/Decap CMS:
|
|
|
26
32
|
|
|
27
33
|
- Offering a modern, intuitive UI, with some inspiration from the Netlify/Decap CMS v3 prototype[^1].
|
|
28
34
|
- Immersive dark mode[^2].
|
|
35
|
+
- The screenshots above are worth a thousand words!
|
|
29
36
|
|
|
30
37
|
### Better performance
|
|
31
38
|
|
|
@@ -56,12 +63,12 @@ Here are some highlights mainly compared to Netlify/Decap CMS:
|
|
|
56
63
|
### Media library enhancements
|
|
57
64
|
|
|
58
65
|
- A whole new media library makes it easier to manage all your assets.
|
|
59
|
-
- You can upload multiple assets at once, including files in nested folders, by browsing or dragging & dropping them
|
|
60
|
-
- You can now navigate between the global media folder and a per-collection media folder[^6]
|
|
66
|
+
- You can upload multiple assets at once, including files in nested folders, by browsing or dragging & dropping them into the media library[^5].
|
|
67
|
+
- You can now navigate between the global media folder and a per-collection media folder[^6].
|
|
61
68
|
|
|
62
69
|
## Compatibility
|
|
63
70
|
|
|
64
|
-
While we’re not recreating all the features found in Netlify/Decap CMS, our plan is to gradually expand the compatible areas where possible so that more users can migrate to our alternative.
|
|
71
|
+
While we’re not recreating all the features found in Netlify/Decap CMS, our plan is to gradually expand the compatible areas where possible so that more users can migrate to our modern alternative.
|
|
65
72
|
|
|
66
73
|
| Feature | Status in Sveltia CMS |
|
|
67
74
|
| --- | --- |
|
|
@@ -71,7 +78,7 @@ While we’re not recreating all the features found in Netlify/Decap CMS, our pl
|
|
|
71
78
|
| Media | External media storage services are not yet supported. |
|
|
72
79
|
| Editorial Workflow | Coming soon. |
|
|
73
80
|
| Collections | Supported. |
|
|
74
|
-
| Widgets | See below. |
|
|
81
|
+
| Widgets | [See below](#widget-limitations) for the current limitations. |
|
|
75
82
|
| Custom widgets | Not yet supported. |
|
|
76
83
|
| Custom previews | Not yet supported. |
|
|
77
84
|
|
|
@@ -100,7 +107,7 @@ While we’re not recreating all the features found in Netlify/Decap CMS, our pl
|
|
|
100
107
|
| Open Authoring | Not yet supported. |
|
|
101
108
|
| Folder Collections Path | Not yet supported. |
|
|
102
109
|
| Folder Collections Media and Public Folder | Only the _undocumented_, absolute path per-collection folder configuration is currently supported. [See below](#use-a-custom-media-folder-for-a-collection). |
|
|
103
|
-
| List Widget: Variable Types |
|
|
110
|
+
| List Widget: Variable Types | Supported. |
|
|
104
111
|
| Custom Mount Element | Supported. |
|
|
105
112
|
| Manual Initialization | Not yet supported. |
|
|
106
113
|
| Raw CSS in registerPreviewStyle | Not yet supported. |
|
|
@@ -130,7 +137,13 @@ While we’re not recreating all the features found in Netlify/Decap CMS, our pl
|
|
|
130
137
|
|
|
131
138
|
### New users
|
|
132
139
|
|
|
133
|
-
Currently, Sveltia CMS is aimed at existing Netlify/Decap CMS users. If you don’t have it yet, follow [their documentation](https://decapcms.org/docs/
|
|
140
|
+
Currently, Sveltia CMS is aimed at existing Netlify/Decap CMS users. If you don’t have it yet, follow [their documentation](https://decapcms.org/docs/add-to-your-site/) to add it to your site first. Then migrate to Sveltia CMS as described below.
|
|
141
|
+
|
|
142
|
+
As the product evolves, we’ll implement the configuration editor and provide comprehensive documentation to make it easier for everyone to get started with Sveltia CMS.
|
|
143
|
+
|
|
144
|
+
Here are some starter templates for popular frameworks created by our contributors. More to follow!
|
|
145
|
+
|
|
146
|
+
- [Eleventy](https://github.com/danurbanowicz/eleventy-sveltia-cms-starter) by [@danurbanowicz](https://github.com/danurbanowicz)
|
|
134
147
|
|
|
135
148
|
### Migration
|
|
136
149
|
|
|
@@ -143,11 +156,11 @@ If you’re already using Netlify/Decap CMS with the GitHub backend and don’t
|
|
|
143
156
|
|
|
144
157
|
That’s it! You can open `https://[hostname]/admin/` as before to start editing. There is even no authentication process if you’ve already been signed in with GitHub on Netlify/Decap CMS because Sveltia CMS uses your auth token stored in the browser. Simple enough!
|
|
145
158
|
|
|
146
|
-
That said, we highly recommend testing your new Sveltia CMS instance first on your local machine. See below for how.
|
|
159
|
+
That said, we highly recommend testing your new Sveltia CMS instance first on your local machine. [See below](#work-with-a-local-git-repository) for how.
|
|
147
160
|
|
|
148
161
|
### Bug Report
|
|
149
162
|
|
|
150
|
-
Sveltia CMS is still in early beta, so we do expect various
|
|
163
|
+
Sveltia CMS is still in early beta, so we do expect various issues. Please [report any bug to us](https://github.com/sveltia/sveltia-cms/issues/new).
|
|
151
164
|
|
|
152
165
|
## Tips & tricks
|
|
153
166
|
|
|
@@ -160,7 +173,7 @@ You can host your Sveltia CMS-managed site anywhere, such as [Cloudflare Pages](
|
|
|
160
173
|
You can use Sveltia CMS with a local Git repository, just like the [beta feature](https://decapcms.org/docs/beta-features/#working-with-a-local-git-repository) in Netlify/Decap CMS, but Sveltia CMS has simplified the workflow by removing the necessity of the additional configuration and proxy server, thanks to the [File System Access API](https://developer.chrome.com/articles/file-system-access/).
|
|
161
174
|
|
|
162
175
|
1. Launch the local development server for your frontend framework, typically with `npm run dev`.
|
|
163
|
-
1. Visit `http://localhost:[port]/admin/index.html` with [Chrome or
|
|
176
|
+
1. Visit `http://localhost:[port]/admin/index.html` with [Chrome, Edge or other Chromium-based browser](https://developer.mozilla.org/en-US/docs/web/api/window/showopenfilepicker#browser_compatibility). The port number depends on your framework.
|
|
164
177
|
1. Click “Work with Local Repository” and select the project’s root directory once prompted.
|
|
165
178
|
1. Make some changes on Sveltia CMS.
|
|
166
179
|
1. See if the produced changes look good using `git diff` or a GUI like GitHub Desktop.
|
|
@@ -170,8 +183,8 @@ You can use Sveltia CMS with a local Git repository, just like the [beta feature
|
|
|
170
183
|
|
|
171
184
|
As shown in the screenshot above, you can use different icons for collections in Sveltia CMS.
|
|
172
185
|
|
|
173
|
-
1. Visit [
|
|
174
|
-
1.
|
|
186
|
+
1. Visit the [Material Symbols](https://fonts.google.com/icons?icon.set=Material+Symbols&icon.platform=android) page on Google Fonts.
|
|
187
|
+
1. Search and select an icon, and copy the icon name displayed on the right panel.
|
|
175
188
|
1. Add it to one of your collection definitions in `config.yml` as the new `icon` property, like the example below.
|
|
176
189
|
1. Repeat the same steps for all the collections if desired.
|
|
177
190
|
1. Commit and push the changes to your Git repository.
|
|
@@ -218,7 +231,7 @@ Sveltia CMS comes with a handy DeepL integration so that you can translate any t
|
|
|
218
231
|
|
|
219
232
|
### Use a random ID for an entry slug
|
|
220
233
|
|
|
221
|
-
By default, the [slug for a new entry file](https://decapcms.org/docs/configuration-options/#slug) will be generated based on the entry’s title field. Or, you can specify the collection’s `slug` option to use the file creation date or other fields. While the
|
|
234
|
+
By default, the [slug for a new entry file](https://decapcms.org/docs/configuration-options/#slug) will be generated based on the entry’s `title` field. Or, you can specify the collection’s `slug` option to use the file creation date or other fields. While the behaviour is generally acceptable and SEO-friendly, it’s not useful if the title might change later or if it contains non-Latin characters like Chinese. In Sveltia CMS, you can easily generate a random [UUID](https://developer.mozilla.org/en-US/docs/Glossary/UUID) without a custom widget!
|
|
222
235
|
|
|
223
236
|
It’s simple — just specify `{{uuid}}` (full UUID v4) or `{{uuid_short}}` (last 12 characters only) in the `slug` option. The results would look like `4fc0917c-8aea-4ad5-a476-392bdcf3b642` and `392bdcf3b642`, respectively.
|
|
224
237
|
|
|
@@ -273,17 +286,27 @@ And combine the following policies depending on your Git backend and enabled int
|
|
|
273
286
|
connect-src https://api.deepl.com;
|
|
274
287
|
```
|
|
275
288
|
|
|
276
|
-
|
|
289
|
+
If you have image field(s) and expect that images will be inserted as URLs, you may want to allow any source using a wildcard instead of specifying individual origins:
|
|
277
290
|
|
|
278
|
-
|
|
291
|
+
```csp
|
|
292
|
+
img-src 'self' blob: data: https://*;
|
|
293
|
+
```
|
|
294
|
+
|
|
295
|
+
## Support & feedback
|
|
296
|
+
|
|
297
|
+
Visit the [Discussions](https://github.com/sveltia/sveltia-cms/discussions) page on this GitHub repository and start a new discussion. Tell us your use cases!
|
|
279
298
|
|
|
280
299
|
## Contributions
|
|
281
300
|
|
|
282
|
-
Feel free to [file an issue](https://github.com/sveltia/sveltia-cms/issues/new) for a bug report or feature request! Meanwhile, pull requests
|
|
301
|
+
Feel free to [file an issue](https://github.com/sveltia/sveltia-cms/issues/new) for a bug report or feature request! Meanwhile, pull requests can probably not be accepted now due to limited review resources. Things may change in late 2023!
|
|
302
|
+
|
|
303
|
+
## Links
|
|
304
|
+
|
|
305
|
+
- Introducing Sveltia CMS: a short presentation by [@kyoshino](https://github.com/kyoshino) during the _This Week in Svelte_ online meetup on March 31, 2023 — [recording](https://youtu.be/-YjLubiieYs?t=1660) & [slides](https://docs.google.com/presentation/d/1Wi4ty-1AwOp2-zy7LctmzCV4rrdYPfke9NGhO0DdRdM)
|
|
283
306
|
|
|
284
307
|
## Disclaimer
|
|
285
308
|
|
|
286
|
-
This software is provided “as is” without any express or implied warranty. This product is not affiliated with Netlify, Decap CMS or any other integrated services. All product names, logos, and brands are the property of their respective owners.
|
|
309
|
+
This software is provided “as is” without any express or implied warranty. This product is not affiliated with or endorsed by Netlify, Decap CMS or any other integrated services. All product names, logos, and brands are the property of their respective owners.
|
|
287
310
|
|
|
288
311
|
[^1]: [Netlify/Decap CMS #2557](https://github.com/netlify/netlify-cms/issues/2557)
|
|
289
312
|
[^2]: [Netlify/Decap CMS #3267](https://github.com/netlify/netlify-cms/issues/3267)
|