Skip to content

V3: Accept kebabCased keys in defineContentConfig() #3099

@stijns96

Description

@stijns96

I want to add kebabCased keys to my defineContentConfig() to math the route.path value.

Current

import { defineContentConfig, defineCollection } from "@nuxt/content";

export default defineContentConfig({
  collections: {
    gettingStarted: defineCollection({
      type: "page",
      source: "1.guide/1.getting-started/**/*.md",
    }),
  },
});

Expected

import { defineContentConfig, defineCollection } from "@nuxt/content";

export default defineContentConfig({
  collections: {
    "getting-started": defineCollection({
      type: "page",
      source: "1.guide/1.getting-started/**/*.md",
    }),
  },
});

By supporting this, I can make my queryCollection() a bit more flexible by adding a route.path or a part of it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions