Headless CMS for Svelte and SvelteKit

Managing content never Svelte this good!

Svelte's simple approach to code and GraphQL's efficient data fetching is a dream combo. When adding content to the mix, pair it with a CMS that gets out of your way.

Proudly powered by DatoCMS + Svelte:
New E-Commerce Platform of HANS KOHLER AG
https://kohler.ch
GZNA
https://gzna.com
Flatfox
https://flatfox.ch/c/en/
Roses Fc Mtl
https://www.rosesmtl.ca/
UNVEIL
https://unveil.fr
Agencie Group
http://www.agenciegroup.com
DomeTag
https://dometag.com
Merlin Studio
https://merlin.studio

Worldwide CDN

Building with Svelte is fast. Use a CMS that can keep up.

If your content is always fetched from a single geographical location, there’s no point in building apps with Svelte within a serverless architecture, that is why DatoCMS and Svelte are so powerful together.

DatoCMS delivers your content from a CDN with edges all around the globe, minimizing latency and providing the fastest content delivery on the market.

Read more about our Worldwide CDN

ADL
Adelaide, Australia
Distance
AMS
Amsterdam, Europe
Distance
DCA
Ashburn (Metro), North America
Distance
IAD
Ashburn (Metro), North America
Distance
PDK
Atlanta (Metro), North America
Distance
AKL
Auckland, Australia
Distance
BKK
Bangkok, Asia
Distance
BOG
Bogota, South America
Distance
BOS
Boston, North America
Distance
BNE
Brisbane, Australia
Distance
BRU
Brussels, Europe
Distance
EZE
Buenos Aires, South America
Distance
YYC
Calgary, North America
Distance
CPT
Cape Town, Africa
Distance
MAA
Chennai, India
Distance
CHI
Chicago (Metro), North America
Distance
CHC
Christchurch, Australia
Distance
CMH
Columbus, North America
Distance
LCK
Columbus, North America
Distance
CPH
Copenhagen, Europe
Distance
CWB
Curitiba, South America
Distance
ADS
Dallas (Metro), North America
Distance
DFW
Dallas (Metro), North America
Distance
DEL
Delhi, India
Distance
DEN
Denver, North America
Distance
DTW
Detroit, North America
Distance
DXB
Dubai, Asia
Distance
DUB
Dublin, Europe
Distance
FOR
Fortaleza, South America
Distance
FRA
Frankfurt (Metro), Europe
Distance
WIE
Frankfurt, Europe
Distance
FJR
Fujairah Al Mahta, Asia
Distance
GNV
Gainesville, North America
Distance
ACC
Ghana, Africa
Distance
HEL
Helsinki, Europe
Distance
HKG
Hong Kong, Asia
Distance
HNL
Honolulu, North America
Distance
IAH
Houston, North America
Distance
HYD
Hyderabad, India
Distance
JNB
Johannesburg, Africa
Distance
MCI
Kansas City, North America
Distance
CCU
Kolkata, India
Distance
KUL
Kuala Lumpur, Asia
Distance
LIM
Lima, South America
Distance
LIS
Lisbon, Europe
Distance
LCY
London, Europe
Distance
LHR
London, Europe
Distance
LON
London, Europe
Distance
BUR
Los Angeles (Metro), North America
Distance
HHR
Los Angeles (Metro), North America
Distance
LAX
Los Angeles (Metro), North America
Distance
MAD
Madrid, Europe
Distance
MAN
Manchester, Europe
Distance
MNL
Manila, Asia
Distance
MRS
Marseille, Europe
Distance
MEL
Melbourne, Australia
Distance
MIA
Miami, North America
Distance
LIN
Milan, Europe
Distance
MXP
Milan, Europe
Distance
MSP
Minneapolis, North America
Distance
STP
Minneapolis, North America
Distance
YUL
Montreal, North America
Distance
BOM
Mumbai, India
Distance
MUC
Munich, Europe
Distance
LGA
New York City, North America
Distance
NYC
New York City (Metro), North America
Distance
EWR
Newark, North America
Distance
ITM
Osaka, Asia
Distance
OSL
Oslo, Europe
Distance
PMO
Palermo, Europe
Distance
PAO
Palo Alto (Metro), North America
Distance
CDG
Paris (Metro), Europe
Distance
PAR
Paris (Metro), Europe
Distance
PER
Perth, Australia
Distance
PHX
Phoenix, North America
Distance
PDX
Portland, North America
Distance
GIG
Rio de Janeiro, South America
Distance
FCO
Rome, Europe
Distance
SJC
San Jose, North America
Distance
WVI
San Jose, North America
Distance
SCL
Santiago, South America
Distance
GRU
Sao Paulo (Metro), South America
Distance
BFI
Seattle (Metro), North America
Distance
ICN
Seoul, South Korea
Distance
QPG
Singapore, Asia
Distance
SIN
Singapore, Asia
Distance
SOF
Sofia, Europe
Distance
STL
St.Louis, North America
Distance
BMA
Stockholm, Europe
Distance
SYD
Sydney, Australia
Distance
TYO
Tokyo, Asia
Distance
NRT
Tokyo (Metro), Asia
Distance
YYZ
Toronto, North America
Distance
YVR
Vancouver, North America
Distance
VIE
Vienna, Europe
Distance
WLG
Wellington, Australia
Distance

GraphQL Content API

Ask for what you need, get exactly that

Our Content Delivery API is built with GraphQL. That means powerful developer tools, multiple resources in a single request and complete control over the data your website downloads. The perfect solution for a Svelte.

Read more about our GraphQL API
{}

Svelte example

Svelte + DatoCMS = ✨

Svelte gives you powerful capabilities and supports data fetching for server-side rendering or SSG. If you're familiar with getStaticProps from NextJS, you're going to love load in Svelte.

Bonus point, Svelte pairs wonderfully with our GraphQL API

src/routes/+page.server.js
1
import { executeQuery } from '@datocms/cda-client';
2
3
const query = `{
4
movie(filter: { title: { eq: "Inception" } }) {
5
releaseDate
6
actors { name }
7
}
8
}`;
9
10
export async function load(event) {
11
return executeQuery(query, { includeDrafts: isDraftEnabled(event) });
12
}
13
14
<!-- src/routes/+page.svelte -->
15
<script>
16
export let data;
17
$: ({ movie } = data)
18
</script>
19
20
<main>
21
<h1>{movie.title}</h1>
22
<p>Release Date: {movie.releaseDate}</p>
23
<h2>Actors</h2>
24
<ul>
25
{#each movie.actors as actor}
26
<li>{actor.name}</li>
27
{/each}
28
</ul>
29
</main>

Svelte images

State of the art image handling for optimizations and responsiveness

Feeling stumped without built-in image optimizations when working in Svelte? Combine it with SvelteKit and pair it with our Images API to enjoy a standard HTML approach as we handle image optimizations, lazy loading, and progression through our capabilities with imgix.

Before
Svelte with DatoCMS
Acme Inc. - DatoCMS
Create new Blog post
Title
The Best Video Games to Play
Author
Dan Poe
Content
Text
Lorem ipsum....
Gallery
Text
Lorem ipsum....
CTA label
Try it now!
CTA URL
http://...
Quote
Lorem ipsum....
Author
Steve Jobs
Add a new block:
Text
Gallery
Quote
Call to action
Save Blog Post

A component-centric approach, just like Svelte

Svelte really feels like going back to completeness 😌 - JS, HTML, and CSS in single files creating bidirectional data binding components. Our component-based approach allows developers to clearly divide work amongst themselves and editors to immediately visualize a wireframe, ultimately providing a scalable and customizable experience.

Read more about DatoCMS modular blocks

Svelte example

We're running out of space for how much we love Svelte

With a gorgeous DX, friendly ecosystem, and a less-code approach, working with Svelte and DatoCMS is a dream for SEO-friendly component-based projects.

Stack it up with SvelteKit and you've got all the power of file-based routing, partial hydration, SSR, and SSG readily available at your fingertips 💅

Terminal window
1
npm install @datocms/svelte

“DatoCMS does not force you to speak its language, instead gives you the peace of mind of being able to use the right solution for each project.”

Matteo Manzo
Technical Project Manager @ Cantiere Creativo
Svelte + DatoCMS demo
pages/homepage.js - Visual Studio Code
Try our Project starter

Start your new SvelteKit project in minutes

Learn from our best-practice project. Fully configured and deployed on Vercel. Source included.

We power experiences for over half a billion users
Start using DatoCMS today
According to Gartner 89% of companies plan to compete primarily on the basis of customer experience this year. Don't get caught unprepared.
  • No credit card
  • Easy setup
Subscribe to our newsletter! 📥
One update per month. All the latest news and sneak peeks directly in your inbox.
support@datocms.com ©2024 Dato srl, all rights reserved P.IVA 06969620480