add getRenderFunction()
This commit is contained in:
@@ -34,6 +34,12 @@ export default function gemtext(config: GemtextConfig = {}): AstroIntegration {
|
||||
params.addPageExtension(".gmi")
|
||||
params.addContentEntryType({
|
||||
extensions: [".gmi"],
|
||||
getRenderFunction: async (config) => {
|
||||
return async (entry) => ({
|
||||
html: entry.body ?? '',
|
||||
frontmatter: entry.data,
|
||||
});
|
||||
},
|
||||
getEntryInfo: async ({fileUrl, contents}) => {
|
||||
const lines = contents.split("\n")
|
||||
let data: Record<string, unknown> = {}
|
||||
|
||||
Reference in New Issue
Block a user