Skip to content

Conversation

Copy link

Copilot AI commented Dec 24, 2025

Search was not displaying blog posts - only showing "Blog" link and theme options.

Changes

  • Added queryCollectionNavigation('posts') call to fetch navigation structure in app.vue
  • Passed navigation prop to UContentSearch component

Technical Details

UContentSearch requires both files (search sections) and navigation (content structure) props. The component's mapNavigationItems function matches search sections against navigation paths to generate results. Without navigation, no matches occur.

// Before
const { data: files } = useLazyAsyncData('search', () => queryCollectionSearchSections('posts'), {
  server: false
})

// After
const { data: files } = useLazyAsyncData('search', () => queryCollectionSearchSections('posts'), {
  server: false
})

const { data: navigation } = useLazyAsyncData('navigation', () => queryCollectionNavigation('posts'), {
  server: false
})
<LazyUContentSearch
  :files="files"
  :navigation="navigation"
  shortcut="meta_k"
  :links="links"
  :fuse="{ resultLimit: 42 }"
/>

Screenshots

Before:
Broken search

After:
Fixed search

Search filtering

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • api.fontshare.com
    • Triggering command: /usr/local/bin/node node /home/REDACTED/work/techwatching.dev/techwatching.dev/node_modules/.bin/nuxt dev (dns block)
    • Triggering command: /usr/local/bin/node node /home/REDACTED/work/techwatching.dev/techwatching.dev/node_modules/.bin/nuxt dev adCheckSync,BoundaryEventDispatchTracksNodeRemoval,DestroyProfileOnBrowserClose,DialMediaRouteProvider,GlobalMediaControls,HttpsUpgrades,LensOverlay,MediaRouter,OptimizationHi (dns block)
  • api.fontsource.org
    • Triggering command: /usr/local/bin/node node /home/REDACTED/work/techwatching.dev/techwatching.dev/node_modules/.bin/nuxt dev (dns block)
    • Triggering command: /usr/local/bin/node node /home/REDACTED/work/techwatching.dev/techwatching.dev/node_modules/.bin/nuxt dev adCheckSync,BoundaryEventDispatchTracksNodeRemoval,DestroyProfileOnBrowserClose,DialMediaRouteProvider,GlobalMediaControls,HttpsUpgrades,LensOverlay,MediaRouter,OptimizationHi (dns block)
  • fonts.bunny.net
    • Triggering command: /usr/local/bin/node node /home/REDACTED/work/techwatching.dev/techwatching.dev/node_modules/.bin/nuxt dev (dns block)
    • Triggering command: /usr/local/bin/node node /home/REDACTED/work/techwatching.dev/techwatching.dev/node_modules/.bin/nuxt dev adCheckSync,BoundaryEventDispatchTracksNodeRemoval,DestroyProfileOnBrowserClose,DialMediaRouteProvider,GlobalMediaControls,HttpsUpgrades,LensOverlay,MediaRouter,OptimizationHi (dns block)
  • fonts.google.com
    • Triggering command: /usr/local/bin/node node /home/REDACTED/work/techwatching.dev/techwatching.dev/node_modules/.bin/nuxt dev (dns block)
    • Triggering command: /usr/local/bin/node node /home/REDACTED/work/techwatching.dev/techwatching.dev/node_modules/.bin/nuxt dev adCheckSync,BoundaryEventDispatchTracksNodeRemoval,DestroyProfileOnBrowserClose,DialMediaRouteProvider,GlobalMediaControls,HttpsUpgrades,LensOverlay,MediaRouter,OptimizationHi (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

can you correct the search which is not working properly on the website? blog posts are not displayed in the list like they are on https://techwatching.dev. grab the Nuxt UI docs to check what is the issue if needed


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI changed the title [WIP] Fix issues with blog posts search functionality Fix blog post search by adding navigation prop to UContentSearch Dec 24, 2025
Copilot AI requested a review from TechWatching December 24, 2025 09:47
@TechWatching TechWatching marked this pull request as ready for review December 25, 2025 00:08
Copilot AI review requested due to automatic review settings December 25, 2025 00:08
@TechWatching TechWatching merged commit 3edbac6 into feature/upgrage-blog-stack Dec 25, 2025
4 of 5 checks passed
@TechWatching TechWatching deleted the copilot/fix-blog-posts-search branch December 25, 2025 00:09
Copy link

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 fixes the blog post search functionality by adding the missing navigation prop to the UContentSearch component. The search was previously only displaying the "Blog" link and theme options instead of actual blog post results.

  • Added queryCollectionNavigation('posts') call to fetch navigation structure
  • Passed the navigation prop to UContentSearch component

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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.

2 participants