February 19, 2025Major Update

Migration to Nuxt Content v3

Upgrading to Nuxt Content v3 for enhanced documentation capabilities, improved performance, and better TypeScript support

Migration to Nuxt Content v3

🚀 Nuxtbe v1.1.0 - Migration to Nuxt Content v3: Elevating Content Management!

Hey Nuxtbe community! 🎉 I’m thrilled to announce update to Nuxt Content v3, featuring a major upgrade to our content management system with the migration to Nuxt Content v3. This release introduces powerful enhancements to how you manage documentation, blogs, and changelogs, making your SaaS development smoother, faster, and more scalable. Let’s dive into what’s new and how it impacts your workflow!

🌟 Why This Upgrade?

Nuxt Content v3 brings a suite of improvements that streamline content creation and management for Nuxtbe users. From better performance to enhanced developer tools, this migration ensures that your documentation and content workflows are more efficient and future-proof. Whether you're building a SaaS with extensive docs or managing a blog, these updates are designed to save you time and effort.

🚀 Key Updates

The migration to Nuxt Content v3 introduces several key enhancements to Nuxtbe:

🗄️ Transition to SQL-Based Storage

  • What’s New: Nuxt Content v3 replaces the previous file-based storage with an SQL database system, reducing I/O operations during data queries for better performance and scalability.
  • Impact on Nuxtbe: This behind-the-scenes change doesn’t affect how you write content—your yml, json, and markdown files still work as before—but it significantly speeds up content retrieval and improves scalability for larger datasets.
  • Why It Matters: Faster content queries mean quicker page loads for your documentation and blogs, enhancing the user experience.

📦 Introduction of Content Collections

  • What’s New: Content is now organized into collections, defined in the content.config.ts file, allowing for structured data configuration and type-safe queries.
  • Impact on Nuxtbe: Collections enable better management of related content items (e.g., blog posts, docs sections), with automatic validation of data fields ensuring consistency across your content.
  • Why It Matters: Structured content makes it easier to query and display data dynamically, improving both developer and end-user experiences.

🛠️ Enhanced Utilities

  • What’s New: Nuxt Content v3 introduces updated utilities like queryCollection, replacing the older queryContent API, along with helpers such as queryCollectionNavigation, queryCollectionItemSurroundings, and queryCollectionSearchSections.
  • Impact on Nuxtbe: These utilities simplify content querying and navigation within the application, streamlining the codebase for managing dynamic content like blog posts and changelogs.
  • Why It Matters: Developers can now write more intuitive and powerful queries, reducing complexity and improving maintainability.

🌍 Improved Serverless Compatibility

  • What’s New: The adoption of SQL-based storage enhances compatibility with serverless and edge platforms like Netlify, NuxtHub, and Vercel.
  • Impact on Nuxtbe: Previous challenges with large bundle sizes in serverless environments are mitigated, ensuring smoother deployments and operations.
  • Why It Matters: Deploying Nuxtbe on serverless platforms is now more reliable, making it easier to scale your SaaS without worrying about bundle size constraints.

🎨 Nuxt Studio Integration

  • What’s New: The migration enables seamless integration with Nuxt Studio, a visual editing platform tailored for Nuxt Content projects.
  • Impact on Nuxtbe: This integration provides an intuitive interface for team members to edit and manage content, enhancing the content management workflow.
  • Why It Matters: Non-technical users can now contribute to content updates via a user-friendly CMS, improving collaboration and productivity for your SaaS team.

⚠️ Breaking Changes

As with any major upgrade, there are some breaking changes to be aware of:

  • Module Rename: Nuxt Content v3 consolidates into a single @nuxt/content package, replacing older dependencies like @nuxt/content-theme-docs. Update your dependencies accordingly.
  • Configuration Updates: The content configuration in nuxt.config.ts has new defaults (e.g., documentDriven is now removed).
  • Query API Adjustments: The new queryCollection API replaces queryContent, requiring updates to existing queries (e.g., where(), find() syntax changes).
  • Theme Removal: The default theme is no longer bundled, so you may need to adjust your styles or layouts if you relied on it.

🏗️ How to Upgrade

Ready to take advantage of Nuxt Content v3 in Nuxtbe? Follow these steps:

We did all the migration work needed. All you need to change is this:

  1. Replace old doc layer with new content layer. It will contan all the necessary changes to start using Nuxt Content v3.
  2. Replace old _dir.yml files with new .navigation.yml. And change navigation.redirect to redirect in those files.

Issues & Questions

If you run into any issues, please open a ticket on GitHub or reach out on X.

🙌 Let’s Build Together!

A huge thanks to the Nuxt Content team for their incredible work on v3, and to the Nuxtbe community for your support and feedback. I’d love to hear your thoughts or feature requests! Ping me on X or open a ticket on GitHub.

Happy building, and enjoy the power of Nuxt Content v3 in Nuxtbe! 🚀

Cheers,
Vlad
Creator of Nuxtbe

Share this update