Skip to content

content/index.md is not showing #1449

Answered by kjanusz
NyllRE asked this question in Q&A
Discussion options

You must be logged in to vote

I can confirm the "problem" you described.

with

{
  "devDependencies": {
    "@nuxt/content": "^2.0.0",
    "nuxt": "^3.0.0-rc.4"
  }
}

and

{
  "devDependencies": {
    "@nuxt/content": "^2.0.1",
    "nuxt": "^3.0.0-rc.8"
  }
}

My recommendation: add new index.vue in pages directory, example:

<template>
    <main>
        <ContentList path="/">
            <!-- ...default slot -->
            <template #default="{ list }">
                <div v-for="post in list" :key="post._path">
                    <h2>{{ post.title }}</h2>
                    <p>{{ post.description }}</p>
                    LINK:
                    <nuxt-link :to="post._path">{{ post.title }}</nuxt-link>

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by NyllRE
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants