In SvelteKit each page is defined by a +page.svelte file. E.g.:
src/routes/blog/[slug]/+page.svelte or src/routes/blog/[slug]/+page[.md / .mdx / .svx] since we're using MDsveX.
When creating content with the FrontMatter extension the default file is named index.md. This requires the SvelteKit end user having to rename the file to +page.md so that SvelteKit can direct the route to the specified markdown file.
Assuming we have the following set on fronmatter.json
{
"frontMatter.taxonomy.contentTypes": [
{
"name": "default",
"pageBundle": true,
"fileType": "svx",
…
}
],
"frontMatter.content.pageFolders": [
{
"title": "blog",
"path": "[[workspace]]/src/routes/blog",
"filePrefix": ""
}
]
}
One idea could be to be able to associate a default file name string (which defaults to index) for each content type. Like so:
"frontMatter.taxonomy.contentTypes": [
{
"name": "default",
"pageBundle": true,
"fileType": "svx",
"defaultFileName": "+page", <---
…
}
]
Another idea could be to associate the default file name with a specific folder:
"frontMatter.content.pageFolders": [
{
"title": "blog",
"path": "[[workspace]]/src/routes/blog",
"filePrefix": "",
"defaultFileName": "+page" <---
}
]
}
In SvelteKit each page is defined by a
+page.sveltefile. E.g.:src/routes/blog/[slug]/+page.svelteorsrc/routes/blog/[slug]/+page[.md / .mdx / .svx]since we're using MDsveX.When creating content with the FrontMatter extension the default file is named
index.md. This requires the SvelteKit end user having to rename the file to+page.mdso that SvelteKit can direct the route to the specified markdown file.Assuming we have the following set on
fronmatter.json{ "frontMatter.taxonomy.contentTypes": [ { "name": "default", "pageBundle": true, "fileType": "svx", … } ], "frontMatter.content.pageFolders": [ { "title": "blog", "path": "[[workspace]]/src/routes/blog", "filePrefix": "" } ] }One idea could be to be able to associate a default file name string (which defaults to index) for each content type. Like so:
Another idea could be to associate the default file name with a specific folder: