diff --git a/website/.vitepress/config.mts b/website/.vitepress/config.mts
index 9b03150ca4..874a66531f 100644
--- a/website/.vitepress/config.mts
+++ b/website/.vitepress/config.mts
@@ -53,9 +53,14 @@ export default defineConfig({
'typescript'
]
},
- rewrites: {
- 'blog/posts/:year(\\d{4})-:month(\\d{2})-:day(\\d{2})-:slug([^/]+).md':
- 'blog/:year/:month/:day/:slug.md'
+ rewrites(id) {
+ if (id.startsWith('blog/posts')) {
+ // 'blog/posts/:year-:month-:day-:slug.md': 'blog/:year/:month/:day/:slug.md'
+ return id.replace(
+ /^blog\/posts\/(2[0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])-(.*)/,
+ 'blog/$1/$2/$3/$4'
+ )
+ }
},
sitemap: {
hostname: 'https://electric-sql.com'
diff --git a/website/data/activeJobs.data.ts b/website/data/activeJobs.data.ts
index e969f0216b..724bb26609 100644
--- a/website/data/activeJobs.data.ts
+++ b/website/data/activeJobs.data.ts
@@ -1,17 +1,17 @@
import fs from 'node:fs'
-import path from "node:path"
-import { parse } from "yaml"
+import path from 'node:path'
+import { parse } from 'yaml'
export default {
- watch: ["../about/jobs/*.md"],
+ watch: ['../about/jobs/*.md'],
load(files) {
return files
.map((file) => {
- const slug = path.basename(file, ".md")
+ const slug = path.basename(file, '.md')
- const contents = fs.readFileSync(file, "utf-8")
- const frontmatter = contents.split("---\n")[1]
+ const contents = fs.readFileSync(file, 'utf-8')
+ const frontmatter = contents.split('---\n')[1]
const data = parse(frontmatter)
data.link = `/about/jobs/${slug}`
diff --git a/website/data/posts.data.ts b/website/data/posts.data.ts
index 9c65c23095..fa59d52acd 100644
--- a/website/data/posts.data.ts
+++ b/website/data/posts.data.ts
@@ -1,4 +1,5 @@
import fs from 'node:fs'
+import path from 'node:path'
import { parse } from 'yaml'
export default {
@@ -6,7 +7,7 @@ export default {
load (files) {
return files.map((file) => {
- const base = file.split('blog/posts/')[1].split('.md')[0]
+ const base = path.basename(file, '.md')
const parts = base.split('-')
const year = parts[0]
diff --git a/website/data/team.data.ts b/website/data/team.data.ts
index b7b53ac080..394c7d950c 100644
--- a/website/data/team.data.ts
+++ b/website/data/team.data.ts
@@ -1,4 +1,5 @@
import fs from 'node:fs'
+import path from 'node:path'
import { parse } from 'yaml'
export default {
@@ -8,7 +9,7 @@ export default {
result = {}
files.forEach((file) => {
- const slug = file.split('/team/')[1].split('.')[0]
+ const slug = path.basename(file, '.yaml')
const contents = fs.readFileSync(file, 'utf-8')
const items = parse(contents).filter(x => x.published)
diff --git a/website/data/use-cases.data.ts b/website/data/use-cases.data.ts
index 1563f0e634..2b79702c88 100644
--- a/website/data/use-cases.data.ts
+++ b/website/data/use-cases.data.ts
@@ -1,6 +1,6 @@
import fs from 'node:fs'
-import path from "node:path"
-import { parse } from "yaml"
+import path from 'node:path'
+import { parse } from 'yaml'
export default {
watch: ["../use-cases/*.md"],
@@ -8,10 +8,10 @@ export default {
load(files) {
return files
.map((file) => {
- const slug = path.basename(file, ".md")
+ const slug = path.basename(file, '.md')
- const contents = fs.readFileSync(file, "utf-8")
- const frontmatter = contents.split("---\n")[1]
+ const contents = fs.readFileSync(file, 'utf-8')
+ const frontmatter = contents.split('---\n')[1]
const data = parse(frontmatter)
data.link = `/use-cases/${slug}`
diff --git a/website/docs/guides/shapes.md b/website/docs/guides/shapes.md
index e3d4cce2cf..d2519a91f5 100644
--- a/website/docs/guides/shapes.md
+++ b/website/docs/guides/shapes.md
@@ -17,7 +17,7 @@ Shapes are the core primitive for controlling sync in the ElectricSQL system.
## What is a Shape?
-Electric syncs little subsets of your Postgres data into local apps, services and environments. Those subsets are defined using Shapes.
+Electric syncs little subsets of your Postgres data into local apps and services. Those subsets are defined using Shapes.
### Little subsets
diff --git a/website/index.md b/website/index.md
index ef8217942d..64ce5a9a9a 100644
--- a/website/index.md
+++ b/website/index.md
@@ -25,7 +25,7 @@ features:
details: >-
Sync subsets of your Postgres data into
- local apps and environments.
+ local apps and services.
@@ -35,9 +35,8 @@ features:
- title: Cloud
details: >-
- Hosted Electric sync that's blazing fast and
- scales to
- millions
+ Hosted sync that's blazing fast and scales
+ to millions
of users.
diff --git a/website/product/sync.md b/website/product/sync.md
index b2f6b52505..d62ae2922d 100644
--- a/website/product/sync.md
+++ b/website/product/sync.md
@@ -2,7 +2,7 @@
title: Sync
description: >-
Sync little subsets of your Postgres data into
- local apps, services and environments.
+ local apps and services.
outline: deep
---
@@ -46,7 +46,7 @@ onMounted(async () => {
# Sync
Sync little subsets of your Postgres data into
-local apps, services and environments.
+local apps and services.