We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
genContentId
stripIndexMd
1 parent 41180fd commit f69777dCopy full SHA for f69777d
src/content/config.ts
@@ -8,14 +8,14 @@ import { file, glob } from "astro/loaders";
8
import { parse as parseToml } from "toml";
9
10
// strips out "/index.md" prefix.
11
-const genContentId = (opts: { entry: string }) =>
+const stripIndexMd = (opts: { entry: string }) =>
12
opts.entry.replace(/\/index\.md[x]?$/, "");
13
14
const blog = defineCollection({
15
loader: glob({
16
pattern: "**/index.md*",
17
base: "./src/content/blog",
18
- generateId: genContentId,
+ generateId: stripIndexMd,
19
}),
20
schema: ({ image }) =>
21
z.object({
0 commit comments