@sveltia/cms 0.71.0 → 0.71.1
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 +12 -10
- package/dist/sveltia-cms.js +82 -78
- package/dist/sveltia-cms.js.map +1 -1
- package/dist/sveltia-cms.mjs +79 -75
- package/dist/sveltia-cms.mjs.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -65,7 +65,7 @@ The free, open source alternative/successor to Netlify/Decap CMS is now in publi
|
|
|
65
65
|
- [Adding dividers to the collection list](#adding-dividers-to-the-collection-list)
|
|
66
66
|
- [Using a custom media folder for a collection](#using-a-custom-media-folder-for-a-collection)
|
|
67
67
|
- [Specifying default sort field and direction](#specifying-default-sort-field-and-direction)
|
|
68
|
-
- [
|
|
68
|
+
- [Including Hugo’s special index file in a folder collection](#including-hugos-special-index-file-in-a-folder-collection)
|
|
69
69
|
- [Using keyboard shortcuts](#using-keyboard-shortcuts)
|
|
70
70
|
- [Using DeepL to translate entry fields](#using-deepl-to-translate-entry-fields)
|
|
71
71
|
- [Localizing entry slugs](#localizing-entry-slugs)
|
|
@@ -311,7 +311,7 @@ Sveltia CMS has been built with a multilingual architecture from the very beginn
|
|
|
311
311
|
- [Default sort field and direction](#specifying-default-entry-sort-field-and-direction) can be specified.[^172]
|
|
312
312
|
- Sorting entries by a DateTime field works as expected.[^110]
|
|
313
313
|
- Entry grouping and sorting can work together. For example, it’s possible to group by year and then sort by year if configured properly.
|
|
314
|
-
- [Index file inclusion](#
|
|
314
|
+
- [Index file inclusion](#including-hugos-special-index-file-in-a-folder-collection) allows users to edit Hugo’s special `_index.md` file, including localized ones like `_index.en.md`, within a folder collection.[^201] If the `index_file` option is not defined, these files will be hidden in a folder collection unless the `path` option is configured to end with `_index` and the `extension` is `md`.[^120]
|
|
315
315
|
- A console error won’t be thrown when a collection doesn’t have the `title` field.[^152] In that case, an entry summary will be generated from a header in the Markdown `body` field, if exists, or from the entry slug, so the summary will never be an empty.[^161] This supports a typical VitePress setup.
|
|
316
316
|
- If there was an error while parsing an entry file, such as duplicate front matter keys, it won’t show up as a blank entry, and a clear error message will be displayed in the browser console.[^121]
|
|
317
317
|
- A single file can be used for more than one item in a file collection.[^127]
|
|
@@ -563,7 +563,7 @@ Due to the complexity, the following features will be added after the 1.0 releas
|
|
|
563
563
|
- [Open Authoring](https://decapcms.org/docs/open-authoring/)
|
|
564
564
|
- [Nested Collections](https://decapcms.org/docs/collection-nested/) (beta)
|
|
565
565
|
|
|
566
|
-
Found a compatibility issue or other missing feature? [Let us know](https://github.com/sveltia/sveltia-cms/issues/new?
|
|
566
|
+
Found a compatibility issue or other missing feature? [Let us know](https://github.com/sveltia/sveltia-cms/issues/new?type=bug). Bear in mind that undocumented behaviour can easily be overlooked.
|
|
567
567
|
|
|
568
568
|
### Compatibility with Static CMS
|
|
569
569
|
|
|
@@ -592,6 +592,8 @@ While Sveltia CMS is built with Svelte, the application is **framework-agnostic*
|
|
|
592
592
|
|
|
593
593
|
You can use the CMS with any framework or static site generator (SSG) that can load static files during the build process, including but not limited to Astro, Eleventy, Hugo, Jekyll, Next.js, SvelteKit and VitePress.
|
|
594
594
|
|
|
595
|
+
We have added support for features required by certain frameworks, such as [index file inclusion](#including-hugos-special-index-file-in-a-folder-collection) and [slug localization](#localizing-entry-slugs) for Hugo, and [some enhancements](https://github.com/sveltia/sveltia-cms/issues/230) for VitePress. [Let us know](https://github.com/sveltia/sveltia-cms/issues/new?type=feature) if your framework has specific needs.
|
|
596
|
+
|
|
595
597
|
### Browser support
|
|
596
598
|
|
|
597
599
|
Sveitia CMS works with all modern browsers, but there are a few limitations because it utilizes some new web technologies:
|
|
@@ -765,7 +767,7 @@ fields:
|
|
|
765
767
|
label: Tags
|
|
766
768
|
icon: sell # or any icon name
|
|
767
769
|
create: true
|
|
768
|
-
folder:
|
|
770
|
+
folder: content/tags
|
|
769
771
|
```
|
|
770
772
|
|
|
771
773
|
### Adding dividers to the collection list
|
|
@@ -796,7 +798,7 @@ public_folder: /media
|
|
|
796
798
|
collections:
|
|
797
799
|
- name: products
|
|
798
800
|
label: Products
|
|
799
|
-
folder:
|
|
801
|
+
folder: content/products
|
|
800
802
|
media_folder: /static/media/products # make sure to append a slash
|
|
801
803
|
public_folder: /media/products
|
|
802
804
|
```
|
|
@@ -821,7 +823,7 @@ For backward compatibility with [Netlify/Decap CMS](https://decapcms.org/docs/co
|
|
|
821
823
|
|
|
822
824
|
For backward compatibility with [Static CMS](https://staticjscms.netlify.app/docs/collection-overview#sortable-fields), the `direction` option accepts title case values: `Ascending` and `Descending`. However, `None` is not supported and has the same effect as `ascending`.
|
|
823
825
|
|
|
824
|
-
###
|
|
826
|
+
### Including Hugo’s special index file in a folder collection
|
|
825
827
|
|
|
826
828
|
Before this feature, Hugo’s [special `_index.md` file](https://gohugo.io/content-management/organization/#index-pages-_indexmd) was hidden in a folder collection, and you had to create a file collection to manage the file, since it usually comes with a different set of fields than regular entry fields. Now, with the new `index_file` option, you can include the index file inside a folder collection, above regular entries, for easier editing:
|
|
827
829
|
|
|
@@ -829,7 +831,7 @@ Before this feature, Hugo’s [special `_index.md` file](https://gohugo.io/conte
|
|
|
829
831
|
collections:
|
|
830
832
|
- name: posts
|
|
831
833
|
label: Blog posts
|
|
832
|
-
folder:
|
|
834
|
+
folder: content/posts
|
|
833
835
|
fields: # Fields for regular entries
|
|
834
836
|
...
|
|
835
837
|
index_file:
|
|
@@ -888,7 +890,7 @@ collections:
|
|
|
888
890
|
- name: posts
|
|
889
891
|
label: Blog posts
|
|
890
892
|
create: true
|
|
891
|
-
folder:
|
|
893
|
+
folder: content/posts
|
|
892
894
|
slug: '{{title | localize}}' # This does the trick
|
|
893
895
|
format: yaml
|
|
894
896
|
i18n: true
|
|
@@ -901,12 +903,12 @@ collections:
|
|
|
901
903
|
|
|
902
904
|
With this configuration, an entry is saved with localized filenames, while the default locale’s slug is stored in each file as an extra `translationKey` property, which is used in [Hugo’s multilingual support](https://gohugo.io/content-management/multilingual/#bypassing-default-linking). Sveltia CMS and Hugo read this property to link localized files.
|
|
903
905
|
|
|
904
|
-
- `
|
|
906
|
+
- `content/posts/en/my-trip-to-new-york.yaml`
|
|
905
907
|
```yaml
|
|
906
908
|
translationKey: my-trip-to-new-york
|
|
907
909
|
title: My trip to New York
|
|
908
910
|
```
|
|
909
|
-
- `
|
|
911
|
+
- `content/posts/fr/mon-voyage-a-new-york.yaml`
|
|
910
912
|
```yaml
|
|
911
913
|
translationKey: my-trip-to-new-york
|
|
912
914
|
title: Mon voyage à New York
|