-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert "feat: support
.md
overrides for content collections"
This reverts commit c06f83e.
- Loading branch information
1 parent
a94e354
commit 3626704
Showing
15 changed files
with
40 additions
and
94 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,6 @@ | ||
export { attachContentServerListeners } from './server-listeners.js'; | ||
export { createContentTypesGenerator } from './types-generator.js'; | ||
export { | ||
contentObservable, | ||
getContentPaths, | ||
getDotAstroTypeReference, | ||
hasMdContentEntryTypeOverride, | ||
} from './utils.js'; | ||
export { getMarkdownContentEntryType } from './markdown.js'; | ||
export { contentObservable, getContentPaths, getDotAstroTypeReference } from './utils.js'; | ||
export { astroContentAssetPropagationPlugin } from './vite-plugin-content-assets.js'; | ||
export { astroContentImportPlugin } from './vite-plugin-content-imports.js'; | ||
export { astroContentVirtualModPlugin } from './vite-plugin-content-virtual-mod.js'; |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
packages/astro/src/vite-plugin-markdown/content-entry-type.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { fileURLToPath } from 'node:url'; | ||
import { ContentEntryType } from '../@types/astro.js'; | ||
import { parseFrontmatter } from '../content/utils.js'; | ||
|
||
export const markdownContentEntryType: ContentEntryType = { | ||
extensions: ['.md'], | ||
async getEntryInfo({ fileUrl, contents }: { fileUrl: URL; contents: string }) { | ||
const parsed = parseFrontmatter(contents, fileURLToPath(fileUrl)); | ||
return { | ||
data: parsed.data, | ||
body: parsed.content, | ||
slug: parsed.data.slug, | ||
rawData: parsed.matter, | ||
}; | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters