When support fetch data from MySQL?
Most websiste based on MySQL, and nuxt/content still can't fetch data from mysql?
Do you have timeline to support it ? thanks!
- If you want to load markdown content from MYSQL database and load it into Nuxt Content, you can create a Custom Source for your collection and feed module.
- Or if you want to connect Nuxt Content to your MYSQL database, we can support it by adding db0's MySQL adapter here
Or do you need something else?
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 30 days.
Hey @farnabaz . I came across this issue, while searching for (mostly) the same thing.
The goal is to have a private page (server-side) behind authentication, retrieving from MYSQL, PGSQL, API endpoint, etc.
The Custom Source from Content wouldn't work, because it loads all the documents upfront, and thus, not private.
In the end of the day, the missing feature would be a SSR page, example app/pages/secret/[...slug].
<script setup lang="ts">
definePageMeta({
layout: 'docs'
})
// Pseudo code to find auth/permissions
if (! notAuthorized) {
throw createError({ statusCode: 403, statusMessage: 'Forbidden', fatal: true })
}
// pseudo-code to retrieve from DB/etc
// const page = ----> we would get the metadata (frontmatter top), and the Markdown (frontmatter body)
const title=page.title
const description=page.description
useSeoMeta({
title,
ogTitle: title,
description,
ogDescription: description
})
// const content = ----> How to render page.markdown? Pass to some function??
// How could we then render it?
<template>
<ContentRenderer
:value="content"
/>
</template
Yes, a complete approach for authorization in nuxt content is still unclear. We are discussing here but running into many issues: https://github.com/nuxt/content/discussions/1532#discussioncomment-14128987
Thanks for the update, @oripka
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 30 days.
This issue was closed because it has been stalled for 30 days with no activity.