diff options
| author | Joe Carstairs <me@joeac.net> | 2026-03-21 19:56:37 +0000 |
|---|---|---|
| committer | Joe Carstairs <me@joeac.net> | 2026-03-21 19:58:25 +0000 |
| commit | 41974cefad8b23d85f4d6e8ba3156c628d1b159d (patch) | |
| tree | 8a4a65561f3a488c3ea99691390ad3bacacaad06 /src/index.ts | |
| parent | 360889eda069882ca971bdc4e097751d2b8cad42 (diff) | |
inlines .gmi
Diffstat (limited to 'src/index.ts')
| -rw-r--r-- | src/index.ts | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/index.ts b/src/index.ts index 2f06f24..f73310d 100644 --- a/src/index.ts +++ b/src/index.ts @@ -3,8 +3,6 @@ import {fileURLToPath} from "url" import gemtextVitePlugin from "./vitePlugin.js" import { parse as parseYaml } from "yaml"; -export const ext = "gmi" - /** Gemtext configuration options */ export interface GemtextConfig { /** Absolute import path to the layout to use for all gemtext pages. @@ -39,9 +37,9 @@ export default function gemtext(config: GemtextConfig = {}): AstroIntegration { new URL("./renderer.js", import.meta.url), ), }) - params.addPageExtension(ext) + params.addPageExtension('.gmi') params.addContentEntryType({ - extensions: [`.${ext}`], + extensions: ['.gmi'], getEntryInfo: async ({ fileUrl, contents }) => { const lines = contents.split('\n'); let data: Record<string, unknown> = {}; |
