Ress
Ress
NNuxt
Created by Ress on 1/27/2025 in #❓・help
Nuxt Content's 3 SQLite not working inside docker.
I've used dockerized Nuxt App with Nuxt Content 2 with bun, but after migrating to Content 3 it stopped working inside docker. Errors:
Failed to execute SQL DROP TABLE IF EXISTS _content_blog;: Error relocating /.output/server/node_modules/better-sqlite3/build/Release/better_sqlite3.node: fcntl64: symbol not found

[nuxt] [request error] [unhandled] [500] Error relocating /.output/server/node_modules/better-sqlite3/build/Release/better_sqlite3.node: fcntl64: symbol not found
Failed to execute SQL DROP TABLE IF EXISTS _content_blog;: Error relocating /.output/server/node_modules/better-sqlite3/build/Release/better_sqlite3.node: fcntl64: symbol not found

[nuxt] [request error] [unhandled] [500] Error relocating /.output/server/node_modules/better-sqlite3/build/Release/better_sqlite3.node: fcntl64: symbol not found
10 replies
NNuxt
Created by Ress on 1/26/2025 in #❓・help
How to create custom text content transformer for Nuxt content v3?
How to create custom text content formatter / hightlight in Nuxt content v3? I see hook 'content:file:beforeParse' https://content.nuxt.com/docs/advanced/hooks But don't understand how to use it, where and how declare
7 replies
NNuxt
Created by Ress on 1/26/2025 in #❓・help
How to add blog post to sitemap.xml with Nuxt Content v3 ?
for nuxt content v2 i was uded something like this in server/routes:
import type { ParsedContent } from '@nuxt/content/dist/runtime/types'
import { serverQueryContent } from '#content/server'
import { asSitemapUrl, defineSitemapEventHandler } from '#imports'

export default defineSitemapEventHandler(async (e) => {
const contentList = (await serverQueryContent(e).find()) as ParsedContent[]
// console.log(contentList)
return contentList
.filter((c) => c._path.startsWith('/blog') || c._path.startsWith('/page'))
.map((c) => {
return asSitemapUrl({
loc: c._path,
// lastmod: updatedAt
})
})
})
import type { ParsedContent } from '@nuxt/content/dist/runtime/types'
import { serverQueryContent } from '#content/server'
import { asSitemapUrl, defineSitemapEventHandler } from '#imports'

export default defineSitemapEventHandler(async (e) => {
const contentList = (await serverQueryContent(e).find()) as ParsedContent[]
// console.log(contentList)
return contentList
.filter((c) => c._path.startsWith('/blog') || c._path.startsWith('/page'))
.map((c) => {
return asSitemapUrl({
loc: c._path,
// lastmod: updatedAt
})
})
})
But with Nuxt Content v3 struggeling to make it working
7 replies