Trying to use the search function of nuxt content / Sort links by directory

Hey there, first off, i'm very new to webdev. I'm going to be asking a lot of really stupid questions here, so bear with me. I tried to google for solutions but unfortunately, it would seem i don't know the questions to google for... Im currently trying to fully implement the nuxt content thingie into my home page. It's working well; i managed to get everything set up to my liking, except for two issues i have. First, i'm trying to implement the search functionality here. I've copied the code snippets, and am seeing the behaviour visible in screenshot 1 and 2, respectively. Needless to say, the search bar doesn't do anything and the search results don't update. Secondly, i am trying to get the links to my markdown files to be grouped by category (read: folder structure). I have set up the example structure in screenshot 3 (please ignore the actual content, these are just some of my notes, which i happen to take in markdown anyway), which displays as seen in screenshot 4. I've tried to work off of the official documentation, mainly by nesting the ContentDoc-component inside the ContentNavigation component. This did not work at all. I've googled this and tried this, which also only throws errors.
Stack Overflow
Fetch all nested content files and group them by directories in Nux...
I'm having this list of blogposts called articles that I call from the content folder. async asyncData ({ $content }) { const articles = await $content('', { deep: true }) // .where({ ...
No description
No description
No description
No description
6 Replies
♡(◑‿◐)♡ Goddess of Depravity⁽™⁾
I forgot to add the error for combining the ContentNavigation and ContentDoc, my bad... one second for reference, this is what i am doing now:
♡(◑‿◐)♡ Goddess of Depravity⁽™⁾
this was what i thought might work
No description
♡(◑‿◐)♡ Goddess of Depravity⁽™⁾
it clearly does not work.
♡(◑‿◐)♡ Goddess of Depravity⁽™⁾
I'm probably missing something super simple. I'm sorry if i am and it's very obvious, i cannot stress how new i am to this. I'm surprised i even got this far - that only goes to show how beginner-friendly nuxt is.
Want results from more Discord servers?
Add your server