diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/index.ts | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/index.ts b/src/index.ts index f5e0d9b..fc5848e 100644 --- a/src/index.ts +++ b/src/index.ts @@ -48,11 +48,15 @@ export default function gemtext(config: GemtextConfig = {}): AstroIntegration { } catch { } } + const body = lines.slice(bodyStartLineIndex).join('\n'); + + const slug = typeof data['slug'] === 'string' ? data['slug'] : fileUrl.pathname; + return { data, rawData: frontmatter, - body: lines.slice(bodyStartLineIndex).join('\n'), - slug: typeof data['slug'] === 'string' ? data['slug'] : fileUrl.pathname, + body, + slug, }; }, }) |
