-
Notifications
You must be signed in to change notification settings - Fork 237
fix(content): use sqlite instead #2152
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
25418a8
03902b1
ebff5b6
d55e6a3
7f1b9a4
1cf99ac
7b8e408
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -75,6 +75,10 @@ export default defineNuxtConfig({ | |
| langs: ['js', 'jsx', 'json', 'ts', 'tsx', 'vue', 'css', 'html', 'bash', 'md', 'mdc', 'yaml', 'sql', 'diff', 'ini'] | ||
| } | ||
| } | ||
| }, | ||
| database: { | ||
| type: 'sqlite', | ||
| filename: '/tmp/nuxt.com.db' | ||
| } | ||
| }, | ||
| mdc: { | ||
|
|
@@ -114,10 +118,10 @@ export default defineNuxtConfig({ | |
| '/404.html': { prerender: true }, | ||
| '/docs/3.x/getting-started/introduction': { prerender: true }, | ||
| '/docs/4.x/getting-started/introduction': { prerender: true }, | ||
| '/modules': { isr: 60 * 60 }, | ||
| '/modules/**': { isr: 60 * 60 }, | ||
| '/modules': { prerender: true }, | ||
| '/modules/**': { prerender: true }, | ||
|
Comment on lines
+121
to
+122
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The configuration attempts to prerender View Details📝 Patch Detailsdiff --git a/nuxt.config.ts b/nuxt.config.ts
index 24330e60..f6fb1cef 100644
--- a/nuxt.config.ts
+++ b/nuxt.config.ts
@@ -277,6 +277,23 @@ export default defineNuxtConfig({
compatibilityDate: '2025-07-14',
nitro: {
hooks: {
+ async 'prerender:routes'(routes) {
+ try {
+ // Fetch all modules from CDN to generate prerender routes
+ const modules = await fetch('https://unpkg.com/@nuxt/modules@latest/modules.json')
+ .then(r => r.json())
+ .catch(() => [])
+
+ // Add routes for each module
+ if (Array.isArray(modules)) {
+ for (const module of modules) {
+ routes.add(`/modules/${module.name}`)
+ }
+ }
+ } catch (error) {
+ console.warn('Failed to fetch modules for prerendering:', error)
+ }
+ },
'prerender:route': (route) => {
if (route.error) {
console.error('route.error', route.route, route.error)
AnalysisConfiguration conflict prevents /modules dynamic routes from being prerenderedWhat fails: Routes like How to reproduce:
Result: Only
Expected behavior: According to Nuxt prerendering documentation, when Fix applied: Added |
||
| // API | ||
| '/api/v1/teams': { isr: 60 * 60 }, | ||
| '/api/v1/teams': { prerender: true }, | ||
| // Admin | ||
| '/admin': { ssr: false }, | ||
| '/admin/**': { ssr: false }, | ||
|
|
@@ -272,21 +276,31 @@ export default defineNuxtConfig({ | |
| }, | ||
| compatibilityDate: '2025-07-14', | ||
| nitro: { | ||
| hooks: { | ||
| 'prerender:route': (route) => { | ||
| if (route.error) { | ||
| console.error('route.error', route.route, route.error) | ||
| } | ||
| } | ||
| }, | ||
| compatibilityDate: { | ||
| // Don't generate observability routes | ||
| vercel: '2025-07-14' | ||
| }, | ||
| prerender: { | ||
| crawlLinks: true, | ||
| ignore: [ | ||
| route => route.startsWith('/modules'), | ||
| route => route.startsWith('/modules/'), | ||
| route => route.startsWith('/admin') | ||
| ], | ||
| autoSubfolderIndex: false | ||
| } | ||
| }, | ||
| hub: { | ||
| db: 'sqlite', | ||
| db: { | ||
| dialect: 'sqlite', | ||
| applyMigrationsDuringBuild: false | ||
| }, | ||
| kv: true, | ||
| cache: true | ||
| }, | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Invalid Tailwind duration class -
duration-400doesn't exist in standard Tailwind CSS. The originalduration-[400ms]was a custom arbitrary value that should be preserved.View Details
Analysis
Invalid Tailwind duration class in HeroBackground transition
What fails: HeroBackground component in
app/layouts/default.vueusesduration-400class which doesn't exist in Tailwind CSS. The component's transition duration will not be applied, falling back to browser default instead of the intended 400ms.How to reproduce:
Result: According to Tailwind CSS transition-duration documentation, the valid duration classes are:
duration-75,duration-100,duration-150,duration-200,duration-300,duration-500,duration-700,duration-1000, andduration-0. There is noduration-400class.Expected: The class should be
duration-[400ms](arbitrary value syntax) to specify a custom 400ms transition duration, which was the original correct value before commit 03902b1.Reference: Tailwind CSS Arbitrary Values