From 663aceceb4ff576b4b4c1765434e426c55ebb6fb Mon Sep 17 00:00:00 2001 From: aspizu Date: Mon, 10 Mar 2025 03:37:47 +0530 Subject: [PATCH] docs: update README --- README.md | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/README.md b/README.md index e7a79ec..f1f566a 100644 --- a/README.md +++ b/README.md @@ -7,3 +7,33 @@ ``` bun add --save astro-gemtext ``` + +Add to `astro.config.mjs` + +```ts +import gemtext from "astro-gemtext" + +export default defineConfig({ + integrations: [gemtext({layout: "/src/layouts/Layout.astro"})], +}) +``` + +## Usage + +Create a `/src/pages/example.gmi` file + +```gmi +# Hello World + +This is a gemtext file. + +=> gemtext.gemini README.md +``` + +## Configuration + +### `layout` + +The layout to use for the page. Set to an absolute import path such as +`/src/layouts/Layout.astro`. If you do not use a layout, you will not get HMR, or the +Astro toolbar.