Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 32 additions & 5 deletions docs/content/docs/1.getting-started/3.configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -327,21 +327,21 @@ export default defineNuxtConfig({

### `Postgres`

If you plan to deploy your application using PostgreSQL database you need to use the `postgres` database adapter.
If you plan to deploy your application using PostgreSQL database you need to use the `postgresql` database adapter.

First, make sure to install the `pg` package:

```bash [Terminal]
npx npm i pg
npm i pg
```

Then, configure the `postgres` adapter in your `nuxt.config.ts`:
Then, configure the `postgresql` adapter in your `nuxt.config.ts`:

```ts [nuxt.config.ts]
export default defineNuxtConfig({
content: {
database: {
type: 'postgres',
type: 'postgresql',
url: process.env.POSTGRES_URL,
/* Other options for `pg` */
}
Expand All @@ -356,7 +356,7 @@ If you plan to deploy your application using a LibSQL database you need to use t
First, make sure to install the `@libsql/client` package:

```bash [Terminal]
npx npm i @libsql/client
npm i @libsql/client
```

Then, configure the `libsql` adapter in your `nuxt.config.ts`:
Expand All @@ -377,6 +377,33 @@ export default defineNuxtConfig({
The most popular LibSQL hosting services is [Turso](https://turso.tech/).
::

### `PGlite`

If you plan to deploy your application using a PGlite database you need to use the `pglite` database adapter.

First, make sure to install the `@electric-sql/pglite` package:

```bash [Terminal]
npm i @electric-sql/pglite
```

Then, configure the `pglite` adapter in your `nuxt.config.ts`:

```ts [nuxt.config.ts]
export default defineNuxtConfig({
content: {
database: {
type: 'pglite',
dataDir: '.data/content/pglite'
}
}
})
```

::note
We recommend to only use PGlite in development.
::

## `renderer`

Configure content renderer.
Expand Down
2 changes: 1 addition & 1 deletion docs/content/docs/6.deploy/2.serverless.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Before deploying your project, you need to select a database service:
export default defineNuxtConfig({
content: {
database: {
type: 'postgres',
type: 'postgresql',
url: process.env.POSTGRES_URL
}
}
Expand Down
12 changes: 6 additions & 6 deletions docs/nuxt.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,16 +35,16 @@ export default defineNuxtConfig({
return Object.assign(acc, { [from]: { redirect: to } })
}, {} as Record<string, { redirect: string }>),
},
future: {
compatibilityVersion: 4,
nitro: {
compatibilityDate: {
// Don't generate observability routes
vercel: '2025-07-14',
},
},
hub: {
database: true,
database: 'sqlite',
cache: true,
},
github: {
rootDir: 'docs',
},
llms: {
domain: 'https://content.nuxt.com',
title: 'Nuxt Content',
Expand Down
8 changes: 5 additions & 3 deletions docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,16 @@
"build": "nuxt build"
},
"dependencies": {
"@libsql/client": "^0.15.15",
"@nuxt/content": "link:..",
"@nuxthub/core": "https://pkg.pr.new/@nuxthub/core@3d374d9",
"@nuxt/ui": "^4.1.0",
"@nuxthub/core": "npm:@nuxthub/[email protected]",
"@nuxtjs/plausible": "^2.0.1",
"@vueuse/nuxt": "^14.0.0",
"better-sqlite3": "^12.4.1",
"docus": "https://pkg.pr.new/docus@1194",
"docus": "^5.2.1",
"drizzle-orm": "^0.44.7",
"minisearch": "^7.2.0",
"@nuxt/ui": "^4.1.0",
"nuxt": "^4.2.0"
}
}
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@
"shiki": "^3.14.0",
"slugify": "^1.6.6",
"socket.io-client": "^4.8.1",
"std-env": "^3.10.0",
"tar": "^7.5.1",
"tinyglobby": "^0.2.15",
"ufo": "^1.6.1",
Expand Down
4 changes: 2 additions & 2 deletions playground/content/0.index.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ date: 2024-09-23

## 🎨 Documentations

- [Nuxt v3](/nuxt/getting-started/introduction)
- [Nuxt Content v2](/content-v2/getting-started/installation)
- [Nuxt](/nuxt/getting-started/introduction)
- [Nuxt Content](/content-v2/getting-started/installation)

## 🎨 Playground

Expand Down
13 changes: 10 additions & 3 deletions playground/nuxt.config.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
export default defineNuxtConfig({
modules: [
'@nuxt/ui',
'@nuxt/content',
'@nuxthub/core',
'@nuxt/content',
],
content: {
experimental: {
nativeSqlite: true,
},
// Uncomment to use PGlite instead of SQLite
// database: {
// type: 'pglite',
// dataDir: '.data/content/pglite' // or omit for in-memory database
// },
build: {
markdown: {
remarkPlugins: {
Expand All @@ -31,8 +36,10 @@ export default defineNuxtConfig({
},
},
},
compatibilityDate: '2024-07-24',
compatibilityDate: '2025-10-15',
hub: {
database: true,
database: 'sqlite',
// Or use PGlite with NuxtHub:
// database: 'postgresql',
},
})
13 changes: 9 additions & 4 deletions playground/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,21 @@
"private": true,
"type": "module",
"scripts": {
"dev": "nuxi dev",
"build": "nuxi build",
"generate": "nuxi generate",
"dev": "nuxt dev",
"build": "nuxt build",
"generate": "nuxt generate",
"dev:prepare": "nuxt prepare"
},
"devDependencies": {
"@electric-sql/pglite": "^0.3.10",
"@libsql/client": "^0.15.15",
"@nuxt/content": "latest",
"@nuxt/ui": "^4.1.0",
"@nuxthub/core": "^0.9.0",
"@nuxthub/core": "npm:@nuxthub/[email protected]",
"better-sqlite3": "^12.4.1",
"drizzle-orm": "^0.44.7",
"nuxt": "^4.2.0",
"pg": "^8.16.3",
"remark-code-import": "^1.2.0",
"shiki-transformer-color-highlight": "^1.0.0"
}
Expand Down
5 changes: 3 additions & 2 deletions playground/pages/[...slug].vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
const route = useRoute()

const { data: navigation } = await useAsyncData('contents-list', () => queryCollectionNavigation('content'))
const { data } = await useAsyncData('posts' + route.path, async () => {
const { data } = await useAsyncData(() => 'posts' + route.path, async () => {
return await queryCollection('content').path(route.path).first()
})

const { data: surround } = await useAsyncData('content-surround' + route.path, () => {
const { data: surround } = await useAsyncData(() => 'content-surround' + route.path, () => {
return queryCollectionItemSurroundings('content', route.path, {
before: 1,
after: 1,
Expand All @@ -17,6 +17,7 @@ const { data: surround } = await useAsyncData('content-surround' + route.path, (

<template>
<ContentPage
v-if="data"
:data="data"
:navigation="navigation"
:surround="surround"
Expand Down
Loading
Loading