Skip to content

Update @nuxt/content to version 3.x and refactor content queries #83

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

Merged
merged 14 commits into from
Mar 12, 2025

Conversation

nurRiyad
Copy link
Owner

No description provided.

Copy link

vercel bot commented Mar 11, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
blog ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 12, 2025 10:51pm

@nurRiyad nurRiyad changed the title Update @nuxt/content to version 3.3.0 and refactor content queries Update @nuxt/content to version 3.x and refactor content queries Mar 12, 2025
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR updates @nuxt/content to version 3.x and refactors content queries across the codebase to use the new queryCollection API. Key changes include:

  • New content configuration in content.config.ts supporting robots, sitemap, and ogImage collections.
  • Refactored content query calls in pages, components, and server routes to replace queryContent with queryCollection.
  • Updates to the Nuxt configuration and build workflow to align with the upgraded dependencies.

Reviewed Changes

Copilot reviewed 15 out of 15 changed files in this pull request and generated no comments.

Show a summary per file
File Description
content.config.ts Added new content configuration with multiple collection helpers
nuxt.config.ts Updated module order and sitemap/site config, plus content build config adjustments
server/routes/rss.xml.ts Replaced serverQueryContent with queryCollection and updated property mappings
pages/categories/index.vue Updated query and tag mapping using meta properties
pages/categories/[category].vue Updated query filtering logic and meta extraction for blog posts
pages/blogs/index.vue Refactored content query and meta mapping for blog listing
pages/blogs/[blog].vue Changed query and meta mapping for individual blog posts, including meta tag updates
components/main/trending.vue Updated content query and meta mapping for trending posts
components/main/recent.vue Refactored content query with custom date sorting and meta mapping
components/blog/Toc.vue Updated query call for Table of Contents retrieval
Comments suppressed due to low confidence (1)

pages/blogs/[blog].vue:37

  • Using 'http-equiv' for the og:type meta tag deviates from standard Open Graph usage; please revert to using a metadata attribute like 'hid' to ensure proper handling of meta tags.
{ 'http-equiv': 'og:type', property: 'og:type', content: 'website' },

@nurRiyad nurRiyad merged commit 47a93c6 into main Mar 12, 2025
3 checks passed
@nurRiyad nurRiyad deleted the content-v3 branch March 12, 2025 22:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant