Giter Club home page Giter Club logo

sveltia / sveltia-cms Goto Github PK

View Code? Open in Web Editor NEW
606.0 12.0 27.0 11.27 MB

Alternative to Netlify/Decap CMS. Modern, fast, lightweight, Git-based headless CMS. Free & open source. UX-driven development. Made with Svelte.

License: MIT License

HTML 0.03% Svelte 43.48% JavaScript 56.49%
cms content-management-system decap-cms headless-cms netlify-cms svelte sveltekit sveltia-cms dark-mode deepl-api pexels-api pixabay-api unsplash-api asset-management content-management github-api jamstack javascript vite stock-photos

sveltia-cms's Introduction

Sveltia CMS

Sveltia CMS is a Git-based lightweight headless CMS under active development as a modern, quick replacement for Netlify CMS and Decap CMS. In some simple cases, migration is as easy as a single line of code change, although we are still working on improving compatibility. The free, open source, UX-focused alternative to Netlify/Decap CMS is now in public beta — with more features to come.

Screenshot: Git-based Headless CMS with Dark Mode

Screenshot: Instant Entry Listing, Searching, Saving

Screenshot: Stock Photo Integration with Pexels, Pixabay and Unsplash

Screenshot: All-New Asset Library; Full Internationalization Support with DeepL

Screenshot: Works with Remote (GitHub, GitLab) and Local Repositories; Single-Line Migration from Netlify/Decap CMS (depending on your current setup); Sveltia CMS

Motivation

Sveltia CMS was born in November 2022, when the progress of Netlify CMS was stalled for more than six months. @kyoshino’s clients wanted to replace their Netlify CMS instances without much effort, mainly to get better internationalization (i18n) support.

To achieve radical improvements in UX, performance, i18n and other areas, it was decided to build an alternative from the ground up, while ensuring an easy migration path from the other. After proving the concept with a rapid Svelte prototype, development was accelerated to address their primary use cases. The new offering has since been named Sveltia CMS and released as open source software to encourage wider adoption.

Our goal is to make it a viable successor to Netlify CMS, expand the Git-based headless CMS market, empower small businesses and individuals who need a simple yet powerful CMS solution, and showcase the huge potential of the Svelte framework.

Development status

Sveltia CMS is still in beta, so please be careful when trying it out.

While we are fixing reported bugs as fast as we can, usually within 48 hours, the overall progress may be slower than you think. The thing is, it’s not just a personal project of @kyoshino, but also involves different kinds of activities:

  • Ensuring maximum compatibility with existing versions of Netlify/Decap CMS
  • Tackling as many issues reported to Netlify/Decap CMS as possible (so far 75+ of them have been effectively solved in Sveltia CMS, with the goal of reaching 100 by GA)
  • Implementing our own enhancement ideas

At this point we hope to ship version 1.0 in Q3 2024. Check our release notes for updates.

Features

We are working hard to create a significantly better alternative to Netlify CMS and Decap CMS by improving everything. Here’s what makes Sveltia CMS different. Look how serious we are!

Compatible with Netlify/Decap CMS

  • Ready to replace Netlify/Decap CMS in some casual use case scenarios by updating a single line of code.
  • Your existing configuration file can be reused as is.
  • Various features are still missing though — look at the compatibility chart below to see if you can migrate.

Better UX

  • Created and maintained by an experienced UX engineer who loves code, design and marketing. You can expect constant UX improvements across the platform.
  • Offers a modern, intuitive user interface, including an immersive dark mode1, inspired in part by the Netlify CMS v3 prototype2.
  • Comes with touch device support. While the UI is not yet optimized for small screens, large tablets like iPad Pro or Pixel Tablet should work well. Mobile support is planned after the 1.0 release.
  • Made with Svelte, not React, means we can spend more time on UX rather than tedious state management.
  • The screenshots above are worth a thousand words!
  • Read on to learn about many other enhancements, including performance, productivity, accessibility, service integrations, and an all-new Asset Library.

Better performance

  • Built completely from scratch with Svelte instead of forking React-based Netlify/Decap CMS. The app starts fast and stays fast. The compiled code is vanilla JavaScript — you can use it with almost any framework.
  • Small footprint: The bundle size is less than 500 KB when minified and gzipped, which is much lighter than bloated Netlify CMS (1.5 MB) and Decap CMS (1.8 MB)3. Sveltia CMS is free of technical debt and virtual DOM overhead.
  • Uses the GraphQL API for GitHub and GitLab to quickly fetch content at once, so that entries and assets can be listed and searched instantly4. It also avoids the slowness and potential API rate limit violations caused by hundreds of requests with Relation widgets5.
  • Saving entries and assets to GitHub is also much faster thanks to the GraphQL mutation.
  • Using caching and lazy loading techniques. A list of repository files is stored locally for faster startup and bandwidth savings.
  • Thumbnails of assets, including PDF files, are generated and cached for faster rendering of the Asset Library and other parts of the CMS6.
  • The upcoming Svelte 5 upgrade is anticipated to deliver a further boost in performance, including accelerated speed and reduced code size.

Better productivity

  • You can work with a local Git repository without any configuration or proxy server7.
    • In addition to a streamlined workflow, it offers great performance by loading files natively through the browser rather than using a slow, ad hoc API.
    • It also allows you to bypass the 30 MB file size limit8.
    • The logo_url defined in the configuration will be used9.
  • Eliminates some workflow disruptions in the Content Editor:
    • Click once (the Save button) instead of twice (Publish > Publish now) to save an entry.
    • The editor closes automatically when an entry is saved.
  • You can upload multiple assets at once. (See below)
  • You can delete multiple entries and assets at once.
  • Some keyboard shortcuts are available for faster editing. More to come!
    • View the Content Library: Alt+1
    • View the Asset Library: Alt+2
    • Search for entries and assets: Ctrl+F (Windows/Linux) or Command+F (macOS)
    • Create a new entry: Ctrl+E (Windows/Linux) or Command+E (macOS)
    • Save an entry: Ctrl+S (Windows/Linux) or Command+S (macOS)
  • Never miss out on the latest features and bug fixes by being notified when an update to the CMS is available10.

Better accessibility

  • Improved keyboard handling lets you efficiently navigate through UI elements using the Tab, Space, Enter and arrow keys11.
  • Comprehensive WAI-ARIA support enables users who rely on screen readers such as NVDA and VoiceOver.
  • Ensures sufficient contrast between the foreground text and background colours.
  • Honours your operating system’s reduced motion and reduced transparency settings.
  • We’ll continue to test and improve the application to meet WCAG 2.2.

Better security

  • Avoids high/critical severity vulnerabilities through constant dependency updates and frequent releases12.
  • We have documented how to set up a Content Security Policy for the CMS.
  • The unsafe-eval and unsafe-inline keywords are not needed in the script-src CSP directive13.
  • The same-origin referrer policy is automatically set with a <meta> tag.

Better backend support

  • Uses the GraphQL API where possible for better performance, as mentioned above. You don’t need to set the use_graphql option to enable it for GitHub and GitLab.
  • The Git branch name is automatically set to the repository’s default branch (main, master or whatever) if not specified in the configuration file, preventing data loading errors due to a hardcoded fallback to master14.
  • You can disable automatic deployments by default or on demand to save costs and resources associated with CI/CD and to publish multiple changes at once15.
  • The GitLab backend support comes with background service status checking, just like GitHub.

Better i18n support

  • Sveltia CMS has been built with a multilingual architecture from the very beginning. You can expect top-notch i18n support, as it’s required by clients of maintainer @kyoshino, who himself was a long-time Japanese localizer for Mozilla.
  • You can easily switch between locales while editing with just a click on a button instead of a dropdown list.
  • Fields in non-default locales are validated as expected16.
  • Boolean, DateTime, List and Number fields in the entry preview are displayed in a localized format.
  • Integrates DeepL to allow translation of text fields from another locale with one click.
  • You can disable non-default locale content17.
  • You can use a random UUID for an entry slug, which is a good option for locales that write in non-Latin characters.
  • Removes the limitations in the List and Object widgets so that changes made with these widgets will be duplicated between locales as expected when using the i18n: duplicate field configuration18.
  • Raises a validation error instead of failing silently if the single_file structure is used and a required field is not filled in any of the locales19.
  • Entry-relative media folders can be used in conjunction with the multiple_folders i18n structure20.
  • Boolean fields are updated in real time between locales like other widgets to avoid confusion21.
  • Solves problems with Chinese, Japanese and Korean (CJK) IME text input in the rich text editor for the Markdown widget22.

Better collections

  • You can choose a custom icon for each collection23.
  • Assets stored in a per-collection media folder can be displayed next to the entries.
  • Entry slug template tags support filter transformations just like summary string template tags24.
  • You can set the maximum number of characters for an entry slug with the new slug_length collection option25.
  • Single quotes in a slug will be replaced with sanitize_replacement (default: hyphen) rather than being removed26.

Better content editing

  • Required fields, not optional fields, are clearly marked for efficient data entry.
  • You can revert changes to all fields or a specific field.
  • You can hide the preview of a specific field with preview: false.
  • Fields with validation errors are automatically expanded if they are part of nested, collapsed objects27.
  • When you click on a field in the Preview pane, the corresponding field in the Editor pane is highlighted. It will be automatically expanded if collapsed28.
  • A long validation error message is displayed in full, without being hidden behind the field label29.

Better data output

  • For data consistency, Boolean, List (see below) and other fields are always saved as a proper value, such as an empty string or an empty array, rather than nothing, even if it’s optional or empty.
  • Leading and trailing spaces in text-type field values are automatically removed when you save an entry30.
  • JSON/TOML/YAML data is saved with a new line at the end of the file to prevent unnecessary changes being made to the file31.
  • String values in YAML files can be quoted with the new yaml_quote: true option for a collection, mainly for framework compatibility32.

Better widgets

  • Boolean
    • A required Boolean field with no default value is saved as false by default, without raising a confusing validation error33.
    • An optional Boolean field with no default value is also saved as false by default, rather than nothing34.
  • List
    • A required List field with no subfield or value is marked as invalid35.
    • An optional List field with no subfield or value is saved as an empty array, rather than nothing36.
    • You can enter spaces in a simple text-based List field37.
    • You can preview variable types without having to register a preview template38.
  • Markdown
    • The rich text editor is built with Lexical instead of Slate, which solves several problems found in Netlify/Decap CMS, including fatal application crashes39.
    • You can set the default editor mode by changing the order of the modes option40. If you want to use the plain text editor by default, add modes: [raw, rich_text] to the field configuration.
  • Object
    • Supports variable types just like the List widget. This allows you to have dependent fields in a collection41.
    • An optional Object field can be manually added or removed. If unadded or removed, the required subfields won’t trigger validation errors42.
  • Relation
    • Field options are displayed with no additional API requests5. The options_length property is therefore ignored.
  • Select
    • It’s possible to select an option with value 043.
  • String
    • Supports the type property that accepts url or email as a value, which will validate the value as a URL or email.
    • Supports the prefix and suffix string properties, which automatically prepend and/or append the developer-defined value to the user-input value.
  • Boolean, Number and String
    • Supports the before_input and after_input string properties, which allow developers to display custom labels before and/or after the input UI44. Markdown is supported in the value.
  • File and Image
    • Provides a reimagined all-in-one asset selection dialog for File and Image fields.
      • Collection-specific assets are listed for easy selection, while all assets are displayed in a separate tab45.
      • A new asset can be uploaded by dragging & dropping it into the dialog46.
      • A URL can also be entered in the dialog.
      • Integration with Pexels, Pixabay and Unsplash makes it easy to select and insert a free stock photo47. More services will be added later.
  • List and Object
    • The summary is displayed correctly when it refers to a Relation field48.
  • String, Text and Markdown
    • A required field containing only spaces or line breaks will result in a validation error, as if no characters were entered.
  • New widgets
    • In addition to generating UUIDs for entry slugs, Sveltia CMS also supports the proposed uuid widget with the following properties49:
      • prefix: A string to be prepended to the value. Default: an empty string.
      • use_b32_encoding: Whether to encode the value with Base32. Default: false.
      • read_only: Whether to make the field read-only. Default: true.
    • The experimental compute widget allows to reference the value of other fields in the same collection, similar to the summary property for the List and Object widgets. Use the value property to define the value template, e.g. posts-{{fields.slug}} (example).

Better asset management

  • A completely new Asset Library, built separately from the image selection dialog, makes it easy to manage all of your files, including images, videos and documents.
    • Navigate between the global media folder and per-collection media folders50.
    • Preview image, audio, video, text and PDF files.
      • Check your site’s CSP if the preview doesn’t work.
    • Copy the public URL, file path, text data or image data of a selected asset to clipboard.
      • The file path starts with / as expected51.
    • Edit plain text assets, including SVG images.
    • Replace existing assets.
    • Download one or more selected assets at once.
    • Delete one or more selected assets at once.
    • Upload multiple assets at once, including files in nested folders, by browsing or dragging and dropping them into the library52.
    • Sort or filter assets by name or file type.
    • View asset details, including size, dimensions, commit author/date and a list of entries that use the selected asset.
  • PDF documents are displayed with a thumbnail image in both the Asset Library and the Select File dialog, making it easier to find the file you’re looking for53.
  • Assets stored in an entry-relative media folder are automatically deleted when the associated entry is deleted because these assets are not available for other entries54.
  • Hidden files (dot files) don’t appear in the Asset Library55.

Compatibility

We are trying to make Sveltia CMS as compatible as possible with Netlify/Decap CMS, so that more users can seamlessly switch to our modern, powerful alternative. However, some features will be omitted due to deprecations and other factors.

Current limitations

The table below shows the current limitations of Sveltia CMS, that are expected to be resolved before GA:

Feature Status in Sveltia CMS
Backends Only GitHub and GitLab are available. We’ll add the Test backend for our demo site and see if Azure can also be supported.
Configuration UI Locales are only available in English and Japanese. Comprehensive config validation is not yet implemented.
Media Libraries Cloudinary and Uploadcare are not yet supported.
Workflow Editorial Workflow and Open Authoring are not yet supported.
Content Editor Auto-saving a draft entry is not yet implemented.
Collections Nested collections are not yet supported.
Widgets Custom widgets are not yet supported. See the table below for other limitations.
Customizations Custom previews, custom formatters and event subscriptions are not yet supported.
Widget Status in Sveltia CMS
Code Not yet supported.
DateTime The date_format and time_format options with Moment.js tokens are not yet supported. Note: Decap CMS 3.1 has replaced Moment.js with Day.js; we’ll follow the change soon.
File/Image Field-specific media folders and media library options are not yet supported other than media_library.config.max_file_size for the default media library.
Map Not yet supported.
Markdown Editor components are not yet supported.

Features not to be implemented

  • The deprecated client-side implicit grant for the GitLab backend will not be supported, as it has already been removed from GitLab 15.0. Use the client-side PKCE authorization instead.
  • The Bitbucket, Gitea/Forgejo and Git Gateway backends will not be supported due to performance limitations. We may implement a performant Git Gateway alternative in the future.
  • The Netlify Identity Widget will not be supported as it’s not useful without Git Gateway.
  • The deprecated Netlify Large Media service will not be supported. Consider other storage providers.
  • Sveltia CMS has dropped the support for the deprecated Date widget following Decap CMS 3.0. Use the DateTime widget instead.
  • Remark plugins will not be supported as they are not compatible with our Lexical-based rich text editor.

Roadmap

Before the 1.0 release

  • Enhanced compatibility with Netlify/Decap CMS (see above for the status)
  • Automation test coverage (Vitest + Playwright)
  • Svelte 5 migration
  • Localization
  • Documentation
  • Marketing site
  • Demo site
  • Starter templates

After the 1.0 release

  • Roles56
  • Config editor57
  • Mobile support58
  • and more!

Getting started

New users

Currently, Sveltia CMS is primarily intended for existing Netlify/Decap CMS users. If you don’t have it yet, follow their documentation to add it to your site and create a configuration file first. Then migrate to Sveltia CMS as described below.

As the product evolves, we’ll implement a built-in configuration editor and provide comprehensive documentation to make it easier for everyone to get started with Sveltia CMS.

Here are some starter kits for popular frameworks created by community members. More to follow!

Alternatively, you can probably use one of the Netlify/Decap CMS templates and make a quick migration to Sveltia CMS.

Migration

Have a look at the compatibility chart above first. If you’re already using Netlify/Decap CMS with the GitHub or GitLab backend and don’t have any custom widget, custom preview or plugin, migrating to Sveltia CMS is super easy. Edit /admin/index.html to replace the CMS script tag, and push the change to your repository.

From Netlify CMS:

-<script src="https://unpkg.com/netlify-cms@^2.0.0/dist/netlify-cms.js"></script>
+<script src="https://unpkg.com/@sveltia/cms/dist/sveltia-cms.js"></script>

From Decap CMS:

-<script src="https://unpkg.com/decap-cms@^3.0.0/dist/decap-cms.js"></script>
+<script src="https://unpkg.com/@sveltia/cms/dist/sveltia-cms.js"></script>

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 or GitLab on Netlify/Decap CMS because Sveltia CMS uses your auth token stored in the browser. Simple enough!

That said, we strongly recommend testing your new Sveltia CMS instance first on your local machine. See below for how.

For advanced users, we have also made the bundle available as an npm package. You can install it by running npm i @sveltia/cms or pnpm add @sveltia/cms on your project. The manual initialization flow with the init method is the same as for Netlify/Decap CMS.

Updates

Updating Sveltia CMS is transparent, unless you include a specific version in the <script> source URL or use the npm package. Whenever you (re)load the CMS, the latest version will be served via UNPKG. The CMS also periodically checks for updates and notifies you when a new version is available. After the product reaches GA, you could use a semantic version range (^1.0.0) like Netlify/Decap CMS.

If you’ve chosen to install with npm, updating the package is your responsibility. We recommend using ncu to keep dependencies up to date, otherwise you’ll miss important bug fixes and new features.

Tips & tricks

Moving your site from Netlify to another hosting service

You can host your Sveltia CMS-managed site anywhere, such as Cloudflare Pages or GitHub Pages. But moving away from Netlify means you can no longer sign in with GitHub or GitLab via Netlify. Instead, you can use our own OAuth client, which can be easily deployed to Cloudflare Workers, or any other 3rd party client made for Netlify/Decap CMS.

Working with a local Git repository

You can use Sveltia CMS with a local Git repository like Netlify/Decap CMS, but Sveltia CMS has simplified the workflow by removing the need for additional configuration (the local_backend property) and a proxy server, thanks to the File System Access API available in some modern browsers.

  1. Launch the local development server for your frontend framework, typically with npm run dev or pnpm dev.
  2. Visit http://localhost:[port]/admin/index.html with Chrome or Edge. The port number varies by framework.
    • Other Chromium-based browsers may also work. In Brave, you need to enable the File System Access API with a flag.
  3. Click “Work with Local Repository” and select the project’s root directory once prompted.
    • If you get an error saying “not a repository root directory”, make sure you’ve turned the folder into a repository with either a CUI (git init) or GUI, and the hidden .git folder exists.
    • If you’re using Windows Subsystem for Linux (WSL), you may get an error saying “Can’t open this folder because it contains system files.” This is due to a limitation in the browser, and you can try some workarounds mentioned in this issue and this thread.
  4. Make some changes to your content on Sveltia CMS.
  5. See if the produced changes look good using git diff or a GUI like GitHub Desktop.
  6. Open the dev site at http://localhost:[port]/ to check the rendered pages.
  7. Commit and push the changes if satisfied, or discard them if you’re just testing.

Remember that the local repository support doesn’t do any Git operation. You have to fetch, pull, commit and push all changes manually with a Git client. Also, at this point, you have to reload the CMS to see the latest content after retrieving remote updates (this will be unnecessary once browsers support the proposed FileSystemObserver API).

Using a custom icon for a collection

You can have an icon for each collection for easy identification in the collection list.

  1. Visit the Material Symbols page on Google Fonts.
  2. Search and select an icon, and copy the icon name displayed on the right panel.
  3. Add it to one of your collection definitions in config.yml as the new icon property, like the example below.
  4. Repeat the same steps for all the collections if desired.
  5. Commit and push the changes to your Git repository.
  6. Reload Sveltia CMS once the updated config file is deployed.
   - name: tags
     label: Tags
+    icon: sell
     create: true
     folder: data/tags/

Using a custom media folder for a collection

This is actually not new in Sveltia CMS but rather an undocumented feature in Netlify/Decap CMS59. You can specify media and public folders for each collection that override the global media folder. Well, it’s documented, but that’s probably not what you want.

Rather, if you’d like to add all the media files for a collection in one single folder, specify both media_folder and public_folder instead of leaving them empty. The trick is to use an absolute path for media_folder like the example below. You can try this with Netlify/Decap CMS first if you prefer.

 media_folder: static/media
 public_folder: /media

 collections:
   - name: products
     label: Products
     create: true
     folder: data/products/
+    media_folder: /static/media/products
+    public_folder: /media/products

In Sveltia CMS, those per-collection media folders are displayed prominently for easier asset management.

Using DeepL to translate entry fields

Sveltia CMS comes with a handy DeepL integration so that you can translate any text field from another locale without leaving the content editor. To enable the high-quality, quick translation feature:

  1. Update your configuration file to enable the i18n support with multiple locales.
  2. Sign up for DeepL API and copy your Authentication Key from DeepL’s Account page.
  3. Go back to Sveltia CMS, click on the Account button in the top right corner, then click Settings.
  4. Paste your key to the DeepL API Authentication Key field, and close the Settings dialog.
  5. Open any entry, and you can now translate all fields or individual fields by selecting Translate from the three-dot menu.
  6. If you have upgraded to DeepL API Pro, provide your new Authentication Key in the same way.

Disabling non-default locale content

You can now disable output of content in selected non-default locales by adding the save_all_locales property to the top-level or per-collection i18n configuration. Then you’ll find “Disable (locale name)” in the three-dot menu in the top right corner of the content editor. This is useful if the translation isn’t ready yet, but you want to publish the default locale content first.

With the following configuration, you can disable the French and/or German translation while writing in English.

 i18n:
   structure: multiple_files
   locales: [en, fr, de]
   default_locale: en
+  save_all_locales: false

Using a random ID for an entry slug

By default, the slug for a new entry file 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 for a slug without a custom widget!

It’s simple — just specify {{uuid}} (full UUID v4), {{uuid_short}} (last 12 characters only) or {{uuid_shorter}} (first 8 characters only) in the slug option. The results would look like 4fc0917c-8aea-4ad5-a476-392bdcf3b642, 392bdcf3b642 and 4fc0917c, respectively.

   - name: members
     label: Members
     create: true
     folder: data/members/
+    slug: '{{uuid_short}}'

Disabling automatic deployments

You may already have a CI/CD tool set up on your Git repository to automatically deploy changes to production. Occasionally, you make a lot of changes to your content to quickly reach the CI/CD provider’s (free) build limits, or you just don’t want to see builds triggered for every single small change.

With Sveltia CMS, you can disable automatic deployments by default and manually trigger deployments at your convenience. This is done by adding the [skip ci] prefix to commit messages, the convention supported by GitHub, GitLab, CircleCI, Travis CI, Netlify, Cloudflare Pages and others. Here are the steps to use it:

  1. Add the new automatic_deployments property to your backend configuration with a value of false:
     backend:
       name: github
       repo: owner/repo
       branch: main
    +  automatic_deployments: false
  2. Commit and deploy the change to the config file and reload the CMS.
  3. Now, whenever you save an entry or asset, [skip ci] is automatically added to each commit message. However, deletions are always committed without the prefix to avoid unexpected data retention on your site.
  4. If you want to deploy a new or updated entry, as well as any other unpublished entries and assets, click an arrow next to the Save button in the content editor, then select Save and Publish. This will trigger CI/CD by omitting [skip ci].

If you set automatic_deployments to true, the behaviour is reversed. CI/CD will be triggered by default, while you have an option to Save without Publishing that adds [skip ci] only to the associated commit.

Gotcha: Unpublished entries and assets are not drafts. Once committed to your repository, those changes can be deployed any time another commit is pushed without [skip ci], or when a manual deployment is triggered.

If the automatic_deployments property is defined, you can manually trigger a deployment by selecting Publish Changes under the Account button in the top right corner of the CMS. To use this feature:

  • GitHub Actions:
    1. Without any configuration, Publish Changes will trigger a repository_dispatch event with the sveltia-cms-publish event type. Update your build workflow to receive this event:
       on:
         push:
           branches: [$default-branch]
      +  repository_dispatch:
      +    types: [sveltia-cms-publish]
  • Other CI/CD providers:
    1. Select Settings under the Account button in the top right corner of the CMS.
    2. Select the Advanced tab.
    3. Enter the deploy hook URL for your provider, e.g. Netlify or Cloudflare Pages.
    4. Configure the CSP if necessary. See below.

Setting up Content Security Policy

If your site adopts Content Security Policy (CSP), use the following policy for Sveltia CMS, or some features may not work.

style-src 'self' 'unsafe-inline' https://fonts.googleapis.com;
font-src 'self' https://fonts.gstatic.com;
img-src 'self' blob: data:;
media-src blob:;
frame-src blob:;
script-src 'self' https://unpkg.com;
connect-src 'self' blob: data: https://unpkg.com;

And combine the following policies depending on your Git backend and enabled integrations.

  • GitHub: (If you’re running GitHub Enterprise Server, you’ll also need to add the origin to these directives.)
    img-src https://*.githubusercontent.com;
    connect-src https://api.github.com https://www.githubstatus.com;
    
  • GitLab: (If you’re running a self-hosted instance, you’ll also need to add the origin to these directives.)
    img-src https://gitlab.com https://secure.gravatar.com;
    connect-src https://gitlab.com https://status-api.hostedstatus.com;
    
  • Pexels:
    img-src https://images.pexels.com;
    connect-src https://images.pexels.com https://api.pexels.com;
    
  • Pixabay:
    img-src https://pixabay.com;
    connect-src https://pixabay.com;
    
  • Unsplash:
    img-src https://images.unsplash.com;
    connect-src https://images.unsplash.com https://api.unsplash.com;
    
  • DeepL API Free:
    connect-src https://api-free.deepl.com;
    
  • DeepL API Pro:
    connect-src https://api.deepl.com;
    

If you choose to disable automatic deployments and have configured a webhook URL, you may need to add the origin to the connect-src directive. For example,

  • Netlify:
    connect-src https://api.netlify.com;
    
  • Cloudflare Pages
    connect-src https://api.cloudflare.com;
    

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:

img-src 'self' blob: data: https://*;

Support & feedback

Visit the Discussions page on this GitHub repository and start a new discussion. Tell us about your use cases!

Want to build a website with Sveltia CMS? Maintainer @kyoshino is available for hire depending on your requirements.

Contributions

Since Sveltia CMS is still in beta, we expect various problems. Please report any bugs to us so we can make it better for everyone. Feel free to submit feature requests as well. Meanwhile, pull requests may not be accepted for the time being due to limited review resources and the upcoming Svelte 5 migration. As we get closer to the 1.0 release, we’ll be welcoming localizers.

Tips are always welcome! The project hasn’t set up a sponsorship program, but maintainer @kyoshino has a PayPal account.

Related links

  • Introducing Sveltia CMS: a short technical presentation by @kyoshino during the This Week in Svelte online meetup on March 31, 2023 — recording & slides

As seen on

Disclaimer

This software is provided “as is” without any express or implied warranty. We are not obligated to provide any support for the application. 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.

Footnotes

  1. Netlify/Decap CMS #3267

  2. Netlify/Decap CMS #2557

  3. Netlify/Decap CMS #328, #3853

  4. Netlify/Decap CMS #302, #5549, #6034

  5. Netlify/Decap CMS #4635, #4738, #5920, #6410 2

  6. Netlify/Decap CMS #946

  7. Netlify/Decap CMS #3285

  8. Netlify/Decap CMS #6731

  9. Netlify/Decap CMS #5752

  10. Netlify/Decap CMS #1045, #3353

  11. Netlify/Decap CMS #1333, #7077

  12. Netlify/Decap CMS #6513

  13. Netlify/Decap CMS #2138

  14. Netlify/Decap CMS #3285

  15. Netlify/Decap CMS #6831

  16. Netlify/Decap CMS #5112, #5653

  17. Netlify/Decap CMS #6932

  18. Netlify/Decap CMS #4386, #6978

  19. Netlify/Decap CMS #4480, #6353

  20. Netlify/Decap CMS #4781

  21. Netlify/Decap CMS #7086

  22. Netlify/Decap CMS #1347, #4629, #6287 — Decap 3.0 updated the Slate editor in an attempt to fix the problems, but the IME issues remain unresolved when using a mobile/tablet browser.

  23. Netlify/Decap CMS #1040

  24. Netlify/Decap CMS #4783

  25. Netlify/Decap CMS #526, #6987

  26. Netlify/Decap CMS #7147

  27. Netlify/Decap CMS #5630

  28. Netlify/Decap CMS #7011

  29. Netlify/Decap CMS #1654

  30. Netlify/Decap CMS #1481

  31. Netlify/Decap CMS #1382, #6994

  32. Netlify/Decap CMS #3505

  33. Netlify/Decap CMS #1424

  34. Netlify/Decap CMS #4726

  35. Netlify/Decap CMS #5381

  36. Netlify/Decap CMS #2613

  37. Netlify/Decap CMS #4646, #7167

  38. Netlify/Decap CMS #2307

  39. Netlify/Decap CMS #5673, #6482, #6707, #6999, #7047, #7123, #7152

  40. Netlify/Decap CMS #5125

  41. Netlify/Decap CMS #565

  42. Netlify/Decap CMS #2103

  43. Netlify/Decap CMS #6515

  44. Netlify/Decap CMS #6836

  45. Netlify/Decap CMS #5910

  46. Netlify/Decap CMS #4563

  47. Netlify/Decap CMS #2579

  48. Netlify/Decap CMS #6325

  49. Netlify/Decap CMS #1975

  50. Netlify/Decap CMS #3240

  51. Netlify/Decap CMS #5569

  52. Netlify/Decap CMS #1032

  53. Netlify/Decap CMS #1984

  54. Netlify/Decap CMS #6642

  55. Netlify/Decap CMS #2370, #5596

  56. Netlify/Decap CMS #2

  57. Netlify/Decap CMS #341, #1167

  58. Netlify/Decap CMS #441

  59. Netlify/Decap CMS #3671

sveltia-cms's People

Contributors

kyoshino avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sveltia-cms's Issues

File System Access API Chrome Android Not Work

OS : Android 13
Browser : Chrome 112.0.5615.135

When I use the local Git repository and open the admin page in Chrome it shows like the image below.
IMG_20230513_181203
I found this page which shows that there is a "File System Access API" bug on Chrome Android

Thank You🙏

DateTime-widget loads `pm`-time as `am`

If DateTime has for example 20:00 saved, opening the element in the CMS loads DateTime with 08:00.

The check if the element has been altered and can be saved, does check correctly.
-> opening + save = unwanted change to datetime

Ability to upload Videos to Media Gallery

I've noticed that it the media gallery is somewhat able to handle Videos. For example, it shows the video (without a thumbnail) in, but can't play it or provide full information about it in the Sidebar, for example the Length is listed as "-". Is this a partial implementation of Support for Videos that is still coming? Would appreciate it, if it fully worked sometime.

Any way to filter/group by date past or future?

I have events, that dependent on their date get displayed as upcoming events, or as "highlights" with additional videos, images, comments.
I would like to easily be able to filter/group for this, to easily edit only future or only past events.

Maybe the filter/group-option could provide "current time/date(day,month,year)"-"template tags", and to compare two/multiple values.

    view_filters:
      - label: 'upcoming Events'
        field: datetime
        greater: '{{currentDate}}'
      - label: 'Highlights'
        field: datetime
        lower: '{{currentDate}}'
    view_groups:
      - label: "upcoming?"
        field: datetime
        compare: '{{currentDate}}'

if "widget: image" is direct child of "widget: list", the original filename isn't used

- name: "images"
  label: "Images"
  label_singular: "Image"
  widget: list
  fields:
    - { name: "img", label: "Image", widget: image}

In this case the uploaded images get saved as "image-1683526164572.png" for example.
In other cases the original file name get's used to save the uploaded file.
As far as I can tell the only relevant difference would be it being a direct descendant of a list.

Include branch in Git Repository link

My site is configured to use a branch other than main/master. The Git Repository link always takes me back to main/master. Can this be configured to go to the branch specified in config.yml instead?

Cannot read properties of undefined (reading 'i18n')

Due to my last bug finding success- after unsuccessfully fiddling with configs, I decided to open this issue. Hugo is my SSG.

sveltia-i18n-error

The bug is present with the following configs:

# Path
content/en/collection/
content/english/collection/

# Config
i18n:
  structure: multiple_folders
# Path
content.en/my-collection/

# Config
i18n:
  structure: single_file
# Path
content/my-collection/file.en.md

# Config
i18n:
  structure: multiple_files

My i18n exists themes/my-theme/i18n/ but this should not matter as I understand it, but I did create a i18n/ directory in the root.

The following view works fine:

The bug shows up in the log when clicking on an entry of New button, or loaded via URL.

I am only testing this with local repo file system access, not Github.

if `identifier_field` is set (not default to title), `slug` has to be also set

An entry can't be saved, if identifier_field is set, but not slug.
identifier_field should also change the default of slug

https://decapcms.org/docs/configuration-options/#slug:

a different field can be used via identifier_field

Also it can't anymore be saved, if no title-field exists when no identifier_field or slug is set.
I've had a collection set up this way, and it just saved the entries with a random id (chars and numbers).

`field:` of `widget: list` not working in newLine

if field: is placed in newLine as - { ... } its content

  • vanishes when a new element is added by the button
  • does not get saved correctly

I'm not sure if this is a sveltia-bug, wrong config (not catched) or a problem with YAML-definition

Pre-existing images not displayed in gallery

First of all, thank you for making this. I much prefer using this to Decap CMS.

I have a gallery configured like so in config.yml:

collections: # A list of collections the CMS should be able to edit
  - name: 'myGallery' 
    label: 'My Gallery'
    folder: 'src/routes/myGallery'
    create: true
    fields:
      - { label: 'Title', name: 'title', widget: 'string' }
      - { label: 'Publish Date', name: 'date', widget: 'datetime' }
      - { label: 'Body', name: 'body', widget: 'markdown' }
      - { label: 'Thumbnail', name: 'thumbnail', widget: 'image' }
      - label: 'Gallery'
        name: 'galleryImages'
        widget: 'list'
        summary: '{{fields.image}}'
        field: { label: Image, name: image, widget: image }

When I go to the UI, pre-existing images don't appear in the gallery, even though they are in the Markdown metadata under galleryImages. If I re-add the images via Svelta CMS, the images appear in the UI. However, the resulting Markdown is unchanged, and if I reload the post in the UI, the images disappear again.

add error handling of github api errors

Time to time GitHub API can go down, and make responses with 5xx codes and body like that:

{
   "data": null,
   "errors":[
      {
         "message":"Something went wrong while executing your query. This may be the result of a timeout, or it could be a GitHub bug. Please include `DF4A:6E1B:1D670F9:1DAA64D:64E7DC75` when reporting this issue."
      }
   ]
}

It would be nice to show some error modal with "Retry" button to retry the request.
No errors silently ignored :(

GitLab backend

For self-hosted deployments of websites, it sometimes can be useful or required to choose to work with git repositories in GitLab instead of GitHub.

As a Sveltia CMS user, I need to use it with a custom GitLab instance, in order to deploy to our own GitLab Pages environment.

This could extend the availability of Sveltia CMS by large means to wide user groups.

The GitLab GraphQL API is documented in:

If no custom instance is available, their hosted https://gitlab.com instance provides the same interfaces and allows GitHub login.

Support for toml-format not working

When "toml" is selected as format (/extension), the "Save" of a new Element, ...
... generates an empty toml-file, if working on the local repo.
... throws an Error in the CMS-UI, if working with github.

`widget: number` can save `0` only if it was previously another number

When you set a number-widget to 0 while it was previously empty, the save-button des not get activated.
If you change something else too, to activate the save-button, the 0-field does get saved as if it as empty.

Also the field saves an empty string if left empty, even when required: false

if we have one article = one directory setup, then folder not deleted upon article removal.

If we make use of we use Folder Collections Path and Folder Collections Media and Public Folder for content structure setup we have issue with folder deletion.

We got structure like that:

content/article1/index.md
content/article1/image1.jpg
content/article2/index.md
content/article2/image2.jpg

If we are going to delete article1 from sveltia, then content/article1/index.md removed, but the folder with contents (content/article1/image1.jpg) still persists. We expect that folder deleted with an article and all related images.

Proposed solution: add flag to delete folder with all content.

Files config results in an error

Here is the config:

media_folder: "static/uploads/images"
public_folder: "/uploads"
publish_mode: editorial_workflow

collections:
  - label: "Pages"
    name: "pages"
    files:
      - label: "Requests"
        name: "requests"
        file: "src/content/requests.json"
        fields:
          - { label: "Title", name: "title", widget: "string" }

Seems like the error is coming from here with otherNames receiving [undefined].

const dupName = otherNames.sort().findLast((p) => p.match(regex));

The exact error message is:
image

If `widget: object` is optional, it can't be saved empty if containing required fields

      - name: "audio"
        label: "Audio"
        widget: object
        required: false
        collapsed: true
        fields:
          - { name: "src", label: "Source-URL", widget: "string" }
          - { name: "url", label: "Webpage-URL", widget: "string" }
          - { name: "img", label: "Image", widget: image, required: false }
          - { name: "descr", label: "Description", widget: "string", required: false }

src & url have to be set.

You should be able to save, if an optional object is empty

Cannot sign in locally if Netlify CMS proxy server has been previously used

Hello 👋🏻 I'm very excited about sveltia-cms 😄 I tested it a couple months ago with the local Git repository option and it is all looking wonderfully well done.

However, my deployment still required decap-cms and I reconfigured my dev environment. Since then I cannot get serving locally working again. I get this error:

sveltia-config-error

My config.yml file works just fine with the decap npx netlify-cms-proxy-server so I am sure i'm just misunderstanding something.

Perhaps putting an example config or documenting where sveltia-cms differs from decap-cms would be helpful to me and others.

Anyway, thanks for your hard and really polished work here! Looking forward to future releases 😀

Support multiple image selections with default media library

- { name: "img", label: "Image", widget: image, allow_multiple: true }

The allow_multiple-option of the image-widget seems to not be supported.
Or just the media-library does not support multiple-selection, which would make the option in line with the decap-cms-Doc

allow_multiple: (default: true) when set to false, multiple selection will be disabled even if the media library extension supports it

relation to nested field not working

This field works in decapCMS:

- { name: "section", label: "Section", widget: relation, collection: "pages", value_field: "sections.*.id", display_fields: ["route", "sections.*.id"], search_fields: ["sections.*.id"] }

in sveltiaCMS nested fields can not be accessed.

DecapCMS-Doc:

value_field: (required) name of the field from the referenced collection whose value will be stored for the relation. For nested fields, separate each subfield with a . (e.g. name.first). For list fields use a wildcard * to target all list items (e.g. categories.*).

would be nice to have this feature a documented (also not listed as missing in README.md)

  • accessing nested fields
  • *-wildcard for lists (also if types)
  • save multiple fields of related collection? (not in decapCMS)

Local repository not recognizing posts from remote

I have a Sveltekit static site with Sveltia in a Github repo deployed on Netlify. The deployed version of Sveltia correctly recognizes all posts. However when I run the site in development mode locally and select "Work with local repository", Sveltia only displays the posts that were created using the local version. The posts that were pulled from the Github repo are not shown.

Weird issue when using local Repo

For some reason, whenever I try to use my local repo, it doesn't work and I get the error: "sveltia-cms.js:442 Uncaught (in promise) DOMException: A requested file or directory could not be found at the time an operation was processed." in the console... It worked before, but now seemingly out of nowhere, it doesn't anymore.

slug configuration for svelte-kit

I have a few sites on a svelte kit, and they all mostly depend on https://github.com/pngwn/MDsveX
It means that content stored inside repo in files like that:

src/routes/letters/Ivan/+page.svelte.md
src/routes/letters/Piotr/+page.svelte.md
...
src/routes/letters/{slug}/+page.svelte.md

or

src/routes/blog/my-first-post/+page.svelte.md
src/routes/blog/my-second-post/+page.svelte.md
...
src/routes/blog/{slug}/+page.svelte.md

I can't find a way, how to explain which files should be edited in collections config.

Actually I tried

    folder: "/src/routes/letters/{{slug}}"
    slug: "+page.svelte.md"

but it ignores interpolation.
Or:

    folder: "/src/routes/letters/"
    slug: "{{slug}}/+page.svelte.md"

but it ignores folder creation...

It there a way to store each file in separate folder?

Also is there some option to store assets in the articles folder?

Offer UI feedback when config.yml incorrect, and other issue...?

I ran into another bug. After successfully doing the oauth dance, logging in, seeing request return 200

https://api.github.com/repos/user/my-repo/git/trees/a92c534exxx.......

Sveltia UI updates and says Loading Site Data... but errors with following:

Uncaught (in promise) TypeError: re(...).findLast is not a function
    ry https://example.org/admin/sveltia-cms.js:387
    ry https://example.org/admin/sveltia-cms.js:387
    xO https://example.org/admin/sveltia-cms.js:401
    update https://example.org/admin/sveltia-cms.js:439
    update https://example.org/admin/sveltia-cms.js:439
    hv https://example.org/admin/sveltia-cms.js:1
    He https://example.org/admin/sveltia-cms.js:1
    promise callback*db https://example.org/admin/sveltia-cms.js:1
    pv https://example.org/admin/sveltia-cms.js:1
    ctx https://example.org/admin/sveltia-cms.js:1
    fU https://example.org/admin/sveltia-cms.js:452
    s https://example.org/admin/sveltia-cms.js:1
    De https://example.org/admin/sveltia-cms.js:1
    h https://example.org/admin/sveltia-cms.js:439
    EA https://example.org/admin/sveltia-cms.js:439
    EA https://example.org/admin/sveltia-cms.js:439
    ab https://example.org/admin/sveltia-cms.js:1
    $/< https://example.org/admin/sveltia-cms.js:1
    He https://example.org/admin/sveltia-cms.js:1
    promise callback*db https://example.org/admin/sveltia-cms.js:1
    pv https://example.org/admin/sveltia-cms.js:1
    ctx https://example.org/admin/sveltia-cms.js:1
    jA https://example.org/admin/sveltia-cms.js:439
    s https://example.org/admin/sveltia-cms.js:1
    f4 https://example.org/admin/sveltia-cms.js:217
    jA https://example.org/admin/sveltia-cms.js:439
    ab https://example.org/admin/sveltia-cms.js:1
    $/< https://example.org/admin/sveltia-cms.js:1
    He https://example.org/admin/sveltia-cms.js:1
    W https://example.org/admin/sveltia-cms.js:1
    dU https://example.org/admin/sveltia-cms.js:452
    kU https://example.org/admin/sveltia-cms.js:452
    ev https://example.org/admin/sveltia-cms.js:1
    <anonymous> https://example.org/admin/sveltia-cms.js:452

When switching to decap-cms / netlify-cms.js I see the following error:

Error loading the CMS configuration
Config Errors:

'collections[1].fields[2].fields[0]' must have required property 'search_fields'
...

Check your config.yml file.

After fixing a few bugs in my config and properly loading the content in Decap, I still see above error in Sveltia.

What is also interesting is the config works fine when using localhost version.

Rich Text Editor Thoughts XD

Hi!

So, the rich text editor is something that the teams I am working with will need before we can use Sveltia, and I have some thoughts...

What I ultimately want is a rich text editor where I can create custom svelte components that can be used as "blocks" that the content authors and editors are able to use in the composition of their writing. I want to be able to make custom components for them at their request, and/or offer a library for them to pick and choose from to add to their individual editing experience...

I believe Decep CMS uses Slate under the hood, but there are other more modern solutions like Prose Mirror that you might want to (or already are) considering...

I also recently found some interesting svelte based projects as well that might be useful:

tiptap, of course - https://github.com/ueberdosis/tiptap
svelte wrapper for tiptap - https://github.com/andheller/svelte-tiptap
Editable Website - https://github.com/michael/editable-website
Website for Editable Website to check it out - https://editable.website/
Svelte Prosemirror - https://github.com/TeemuKoivisto/svelte-prosemirror

all cool and interesting projects that I am learning more about to help my own understanding of these things.

Anyway, just wanted to share these resources as you work on rich text editing for Sveltia XD

Custom Theme-ability...

I would absolutely love to be able to customize the look and feel of the CMS UI in the following ways:

  • Typography
  • Colors
    • Toolbar Color
    • Toolbar Font Color
  • Logo
  • Spacing
    • Input Field height and border-radius
    • List row height
    • Paragraph Height
    • Line Height
    • Metadata spacing
    • other things I cannot think of at the moment
  • Font Size Everywhere

I would basically love the ability to customize the general look and feel for clients and configure all that in a css file or something...

Please consider this in the near future, thank you ( ありがとう :-)

Feature Request: Demo Deployment

Hey @kyoshino,

this looks like a wonderful project! Thank you for all this work!

To evaluate the tool it would be very helpful if there was a public demo instance/deployment (e.g. on GitHub Pages). It doesn't need to be full functional, but it would be awesome if we could look at the UI/see the Admin interface in an easy way, without cloning it locally.

Best of luck with this project. I will be following very closely and look forward to having a GitLab backend in the future!

Stuck on Login Page

When I login with github, I get stuck on login page and it just leaves the message "Loading Site Data".

image

Show UI feedback when format / extension are incorrect

I encountered the following issue whereby the config did not show an error (which makes sense) and the UI shows This collection has no entries yet. My collection settings were:

collections:
  - label: "Widgets"
    name: "widgets"
    folder: "content/widgets/"
    extension: "md"
    format: "yaml"

The UX bug (as I would call it) is that Sveltia did not return content in the UI nor inform the user as to why there was no content.

I assumed this is because Sveltia tried to parse the entire file as yaml but since it was a .md + frontmatter file, Sveltia failed silently. Converting the files .yaml and updating extension: "yaml" worked, but incorrect for my SSG.

Changing the value to format: "frontmatter" makes all the data correctly show, as expected 😄

Suggestions

  1. Show user friendly message in UI
## Oops

We found content, but were unable to display it.
Please make sure your settings and files are correct:

folder: "content/widgets/"
extension: "md"
format: yaml
  1. Console log a parsing error (if there is?) such as this so there's a clue.

Relates to #17 but I think is discreet enough to warrant a separate issue and path to resolution.

no line length for editing content with preview turned off...

When editing content with preview turned off (nobody wants or uses the preview pane that I know of, including myself)

there is no line length limit, so the editing experience is severely compromised:

for metadata:

Screenshot 2023-06-18 at 2 50 18 PM

for body copy (content, etc...)

Screenshot 2023-06-18 at 2 50 29 PM

a max line length of 60 to 80 characters would be good, or allowing the user to change it as well. Also, the generally typographic settings are not so hot, as line spacing is not good, font size, etc...

My team and the other teams and people I know who use a CMS NEVER use preview mode, as it is basically useless in every possible conceivable way. They all want an interface more like google docs, MS Word, even Notion style:

Add custom svelte components:

Screenshot 2023-06-18 at 2 59 26 PM

Writing without distractions:

Screenshot 2023-06-18 at 3 01 15 PM

Just want to put these ideas in your heads cuz this is something I really need...

If no matching files (md,json,...) are found, graphql request is wrong

When the folder provided in the config.yml doesn't exist/has no matching files inside, this returns empty filelists, which causes the graphql query to be incorrect.

It returns:

"query {\n    repository(owner: \"<OWNER>\", name: \"<NAME>\") {\n      \n    }\n  }"

(notice the curly brackets with only whitespace characters inside)

GitHub then returns:

{"errors":[{"message":"Parse error on \"}\" (RCURLY) at [4, 5]","locations":[{"line":4,"column":5}]}]}

Which then causes an Error (Chromium) in the javascript stopping the whole Load process:

caught (in promise) TypeError: Cannot destructure property 'repository' of '(intermediate value)' as it is undefined.

This should either:
- load the CMS with an empty list if folder is empty
- notify the User that folder doesn't exist

Nothing can be right/control clicked...why?

Just noticed this, and it feels a bit odd, but nothing in the UI seems to be right/control clickable...not sure if that is intentional or not, but...I don't know...feels a bit off to me...

That's all :-)

[feature request] Preview customization

Being able to customize the previews is an amazing feature in Decap. I use it to import my global css so that the content in the preview looks just like the page the content is on!

Any plans to support this feature? Or perhaps I missed it?

media-select-popup broken

clicking on replace-/add-button for image-widget opens an empty <form> and blocks the page until it's reloaded.
Of course you also can't add images like this.
I don't know since which version this happens, as I just noticed it.

Allow external image src

I have set the media_folder setting to a folder within the /src folder of my Sveltekit site, as I want to use vite-imagetools to transform and optimize all images. This means that the images would not be available through a direct path like they would in /static, and so their thumbnails don't show up in Sveltia's image library. Thus I would like to see external image urls being allowed for the public_folder setting. Maybe it would be even better to have a separate option for the path of Sveltia's image thumbnails vs the path written into the markdown files.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.