summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/index.ts6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/index.ts b/src/index.ts
index 47e82da..4e20848 100644
--- a/src/index.ts
+++ b/src/index.ts
@@ -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> = {}