diff options
| author | Joe Carstairs <me@joeac.net> | 2026-03-21 20:50:17 +0000 |
|---|---|---|
| committer | Joe Carstairs <me@joeac.net> | 2026-03-21 20:50:17 +0000 |
| commit | 237990619e1f5a4ea9223f603d1ce599bc3b0fd1 (patch) | |
| tree | 66c7ce39afb17e1d4e688d7cef6a17a12d26d865 /src/index.ts | |
| parent | c3c710107de80feb2bc31a35d3e49220456882b3 (diff) | |
add getRenderFunction()
Diffstat (limited to 'src/index.ts')
| -rw-r--r-- | src/index.ts | 6 |
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> = {} |
