@sveltia/cms 0.82.1 → 0.83.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 CHANGED
@@ -67,6 +67,7 @@ The free, open source alternative/successor to Netlify/Decap CMS is now in publi
67
67
  - [Using a custom media folder for a collection](#using-a-custom-media-folder-for-a-collection)
68
68
  - [Specifying default sort field and direction](#specifying-default-sort-field-and-direction)
69
69
  - [Including Hugo’s special index file in a folder collection](#including-hugos-special-index-file-in-a-folder-collection)
70
+ - [Using singletons](#using-singletons)
70
71
  - [Using keyboard shortcuts](#using-keyboard-shortcuts)
71
72
  - [Translating entry fields with one click](#translating-entry-fields-with-one-click)
72
73
  - [Localizing entry slugs](#localizing-entry-slugs)
@@ -128,9 +129,8 @@ Sveltia CMS is currently in **beta** and version 1.0 (GA) is expected to ship in
128
129
  While we fix reported bugs as quickly as possible, usually within 24 hours, our overall progress may be slower than you think. The thing is, it’s not just a personal project of [@kyoshino](https://github.com/kyoshino), but also a complicated system involving various kinds of activities that require considerable effort:
129
130
 
130
131
  - Ensuring substantial [compatibility with Netlify/Decap CMS](#compatibility)
131
- - Providing partial [compatibility with Static CMS](#compatibility-with-static-cms)
132
132
  - Tackling as many [Netlify/Decap CMS issues](https://github.com/decaporg/decap-cms/issues) as possible
133
- - So far, 225+ issues, or 460+ if including duplicates, have been effectively solved in Sveltia CMS
133
+ - So far, 225+ issues, or 465+ if including duplicates, have been effectively solved in Sveltia CMS (Yes, you read it right)
134
134
  - Target:
135
135
  - 200 issues, or 400 if including duplicates, by GA — We did it! 🎉
136
136
  - 400 issues, or 800 if including duplicates, in the future 💪
@@ -294,6 +294,7 @@ Sveltia CMS has been built with a multilingual architecture from the very beginn
294
294
  - Configuration
295
295
  - Provides some new options, including:
296
296
  - `icon`: [Choose a custom icon for each collection](#using-a-custom-icon-for-a-collection).[^3]
297
+ - The option can also be used for individual files within a file collection. The specified icon will then appear in the file list.
297
298
  - `thumbnail`: Specify the field name for a thumbnail displayed on the entry list, like `thumbnail: featuredImage`.[^130]
298
299
  - A nested field can be specified using dot notation, e.g. `heroImage.src`.
299
300
  - A wildcard in the field name is also supported, e.g. `images.*.src`.
@@ -315,6 +316,7 @@ Sveltia CMS has been built with a multilingual architecture from the very beginn
315
316
  - The `date` transformation supports the time zone argument. The only available value is `utc`, which converts a date to UTC. This is useful if the specified DateTime field is local, but you want to force UTC in the entry slug, e.g. `{{date | date('YYYYMMDD-HHmm', 'utc')}}`. ([Discussion](https://github.com/sveltia/sveltia-cms/issues/278#issuecomment-2565313420))
316
317
  - The `date` transformation returns an empty string if an invalid date is given.[^176]
317
318
  - Multiple transformations can be chained like `{{title | upper | truncate(20)}}`.
319
+ - Sveltia CMS supports [singletons](#using-singletons), a simple form of a file collection.[^233]
318
320
  - The collection `label` defaults to the `name` value according to the [Decap CMS document](https://decapcms.org/docs/configuration-options/#collections), while Netlify/Decap CMS actually throws a configuration error if the `label` option is omitted.
319
321
  - Nested fields (dot notation) can be used in the `path` option for a folder collection, e.g. `{{fields.state.name}}/{{slug}}`.[^62]
320
322
  - Markdown is supported in the `description` collection option.[^79] Bold, italic, strikethrough, code and links are allowed.
@@ -610,7 +612,7 @@ Found a compatibility issue or other missing feature? [Let us know](https://gith
610
612
 
611
613
  ### Compatibility with Static CMS
612
614
 
613
- Sveltia CMS provides partial compatibility with [Static CMS](https://github.com/StaticJsCMS/static-cms), a now-defunct fork of Netlify CMS. This README will be updated as our development progresses.
615
+ Sveltia CMS provides partial compatibility with [Static CMS](https://github.com/StaticJsCMS/static-cms), a now-defunct fork of Netlify CMS. Since Static CMS was archived some time ago, we don’t plan to implement additional compatibility beyond what’s listed below. However, we may still adopt some of their features that we find useful.
614
616
 
615
617
  - Configuration options
616
618
  - Static CMS made [some breaking changes](https://staticjscms.netlify.app/docs/decap-migration-guide) to view filters/groups, List widget, etc. while Sveltia CMS follows Netlify/Decap CMS, so you should review your configuration carefully.
@@ -893,6 +895,45 @@ collections:
893
895
 
894
896
  Note that the special index file is placed right under the `folder`, regardless of the collection’s [`path` option](https://decapcms.org/docs/collection-folder/#folder-collections-path). For example, if the `path` is `{{year}}/{{slug}}`, a regular entry would be saved as `content/posts/2025/title.md`, but the index file remains at `content/posts/_index.md`.
895
897
 
898
+ ### Using singletons
899
+
900
+ The singleton collection is an unnamed, non-nested variant of a [file collection](https://decapcms.org/docs/collection-file/) that can be used to manage static data files. Singleton files appear in the content library’s sidebar under the “Files” group, and users can open the Content Editor directly without navigating to a file list.
901
+
902
+ To create this special file collection, add the new `singletons` option, along with an array of file definitions, to the root level of your site configuration:
903
+
904
+ ```yaml
905
+ collections:
906
+ # Conventional file collection
907
+ - name: pages
908
+ label: Pages
909
+ files:
910
+ - name: home
911
+ label: Home Page
912
+ file: content/home.yaml
913
+ ...
914
+ - name: about
915
+ label: Site Settings
916
+ file: content/settings.yaml
917
+ ...
918
+
919
+ # Singleton collection
920
+ singletons:
921
+ - name: home
922
+ label: Home Page
923
+ file: content/home.yaml
924
+ icon: home # You can specify an icon
925
+ ...
926
+ - name: divider-1
927
+ divider: true # You can also add dividers
928
+ - name: about
929
+ label: Site Settings
930
+ file: content/settings.yaml
931
+ icon: settings
932
+ ...
933
+ ```
934
+
935
+ If you want to reference a singleton file with a Relation field, use `_singletons` as the `collection` name.
936
+
896
937
  ### Using keyboard shortcuts
897
938
 
898
939
  - View the Content Library: `Alt+1`
@@ -1350,7 +1391,6 @@ Due Q4 2025
1350
1391
  - Tackling some more Netlify/Decap CMS issues:
1351
1392
  - [Directory navigation in the asset library](https://github.com/sveltia/sveltia-cms/issues/420)[^240] (#5 top-voted feature of Netlify/Decap CMS)
1352
1393
  - [Multiple file selection with the File and Image widgets](https://github.com/sveltia/sveltia-cms/issues/10)[^239] (#14)
1353
- - [Singletons](https://github.com/sveltia/sveltia-cms/issues/435)[^233] (#23)
1354
1394
  - [Git LFS support for GitHub backend](https://github.com/sveltia/sveltia-cms/discussions/353)[^244] (#26)
1355
1395
  - Advanced Relation fields[^242], including cascade updates/deletes[^243] and [reverse reference lists](https://github.com/sveltia/sveltia-cms/discussions/416)
1356
1396
  - Cloudinary and Uploadcare issues, including existing file selection[^247]
@@ -1363,18 +1403,19 @@ Due Q4 2025
1363
1403
  - [Localization](https://github.com/sveltia/sveltia-cms/blob/main/src/lib/locales/README.md)
1364
1404
  - Developer documentation (implementation guide)
1365
1405
  - Marketing site
1366
- - Live demo site
1406
+ - [Live demo site](https://github.com/sveltia/sveltia-cms/issues/1)
1367
1407
 
1368
1408
  ### v2.0
1369
1409
 
1370
- - Implementing [some deferred Netlify/Decap CMS features](#current-limitations)
1371
- - Tackling even more Netlify/Decap CMS issues
1410
+ - Implementing [a few deferred Netlify/Decap CMS features](#current-limitations):
1411
+ - [Editorial Workflow](https://decapcms.org/docs/editorial-workflows/)
1412
+ - [Open Authoring](https://decapcms.org/docs/open-authoring/)
1413
+ - [Nested Collections](https://decapcms.org/docs/collection-nested/) (beta)
1372
1414
  - End-user documentation
1373
- - Contributor documentation
1374
1415
 
1375
1416
  ### Future
1376
1417
 
1377
- - Tackling many of the remaining Netlify/Decap CMS issues, including MDX support,[^122] manual entry sorting,[^125] config editor,[^10] offline support,[^238] and other [top-voted features](https://github.com/decaporg/decap-cms/issues?q=is%3Aissue+is%3Aopen+sort%3Areactions-%2B1-desc) (some of them may be included in v2.0)
1418
+ - Tackling many of the remaining Netlify/Decap CMS issues, including MDX support,[^122] [manual entry sorting](https://github.com/sveltia/sveltia-cms/issues/214),[^125] config editor,[^10] offline support,[^238] and other [top-voted features](https://github.com/decaporg/decap-cms/issues?q=is%3Aissue+is%3Aopen+sort%3Areactions-%2B1-desc) (some of them may be included in v2.0)
1378
1419
  - Exploring features that require server-side implementation, including user management (Netlify Identity alternative), roles,[^23] commits without a Git service account (Git Gateway alternative), post locking (like [WordPress](https://codex.wordpress.org/Post_Locking))[^166] and scheduled posts[^167]
1379
1420
  - More integration options: stock photos, stock videos, cloud storage providers, translation services, maps, analytics tools, etc.
1380
1421
  - AI integrations for image generation, content writing, translation, etc.
@@ -1383,10 +1424,12 @@ Due Q4 2025
1383
1424
  - Marketplace for custom widgets, etc.
1384
1425
  - VS Code extension for `config.yml` schema validation
1385
1426
  - Official starter templates for the most popular frameworks, including SvelteKit and Next.js
1427
+ - Contributor documentation
1386
1428
  - and so much more!
1387
1429
 
1388
1430
  ## Trivia
1389
1431
 
1432
+ - As mentioned in the [Motivation](#motivation) section, Sveltia CMS is a complete rewrite of Netlify CMS. We rarely look at the predecessor’s code and don’t use any of it. This is why Sveltia CMS is free of their bugs.
1390
1433
  - The [original version of Netlify CMS](https://github.com/netlify/netlify-cms-legacy) was built with Ember before being rewritten in React. And now we are completely rewriting it in Svelte. So this is effectively the second time the application has gone through a framework migration.
1391
1434
  - Our [local repository workflow](#working-with-a-local-git-repository) shares implementation with the Test backend, as both utilize the [File System API](https://developer.mozilla.org/en-US/docs/Web/API/File_System_API), allowing us to reduce maintenance costs. The seamless local workflow is critical not only for improved DX, but also for our rapid application development.
1392
1435
 
@@ -1547,7 +1590,7 @@ This software is provided “as is” without any express or implied warranty. W
1547
1590
 
1548
1591
  [^72]: Netlify/Decap CMS [#7047](https://github.com/decaporg/decap-cms/issues/7047)
1549
1592
 
1550
- [^73]: Netlify/Decap CMS [#6993](https://github.com/decaporg/decap-cms/issues/6993), [#7123](https://github.com/decaporg/decap-cms/issues/7123), [#7127](https://github.com/decaporg/decap-cms/issues/7127), [#7128](https://github.com/decaporg/decap-cms/issues/7128), [#7237](https://github.com/decaporg/decap-cms/issues/7237), [#7251](https://github.com/decaporg/decap-cms/issues/7251), [#7361](https://github.com/decaporg/decap-cms/issues/7361), [#7391](https://github.com/decaporg/decap-cms/issues/7391), [#7393](https://github.com/decaporg/decap-cms/issues/7393), [#7470](https://github.com/decaporg/decap-cms/issues/7470), [#7475](https://github.com/decaporg/decap-cms/issues/7475), [#7480](https://github.com/decaporg/decap-cms/issues/7480), [#7503](https://github.com/decaporg/decap-cms/issues/7503), [#7504](https://github.com/decaporg/decap-cms/issues/7504)
1593
+ [^73]: Netlify/Decap CMS [#6993](https://github.com/decaporg/decap-cms/issues/6993), [#7123](https://github.com/decaporg/decap-cms/issues/7123), [#7127](https://github.com/decaporg/decap-cms/issues/7127), [#7128](https://github.com/decaporg/decap-cms/issues/7128), [#7237](https://github.com/decaporg/decap-cms/issues/7237), [#7251](https://github.com/decaporg/decap-cms/issues/7251), [#7361](https://github.com/decaporg/decap-cms/issues/7361), [#7391](https://github.com/decaporg/decap-cms/issues/7391), [#7393](https://github.com/decaporg/decap-cms/issues/7393), [#7470](https://github.com/decaporg/decap-cms/issues/7470), [#7475](https://github.com/decaporg/decap-cms/issues/7475), [#7480](https://github.com/decaporg/decap-cms/issues/7480), [#7503](https://github.com/decaporg/decap-cms/issues/7503), [#7504](https://github.com/decaporg/decap-cms/issues/7504), [#7524](https://github.com/decaporg/decap-cms/issues/7524)
1551
1594
 
1552
1595
  [^74]: Netlify/Decap CMS [#4209](https://github.com/decaporg/decap-cms/issues/4209)
1553
1596