2026-03-21 12:12:45 +00:00
2026-03-21 12:12:45 +00:00
2025-03-10 02:58:09 +05:30
2025-03-10 02:58:09 +05:30
2025-03-10 02:58:09 +05:30
2026-03-21 11:51:29 +00:00
2026-03-21 11:38:20 +00:00
2025-03-10 02:58:09 +05:30

astro-gemtext

Forked from github.com/aspizu/astro-gemtext.

astro-gemtext is an Astro integration for gemtext documents. gemtext is a hypertext markup language used in the Gemini protocol. This integration allows you to use .gmi files as pages in your Astro site. Just install the integration and .gmi files in /src/pages will be rendered as HTML.

Installation

npm install git+https://git.joeac.net/joeac/astro-gemtext

Add to astro.config.mjs

import gemtext from "astro-gemtext"

export default defineConfig({
    integrations: [gemtext({layout: "/src/layouts/Layout.astro"})],
})

Important

If you do not provide a layout option, Astro's HMR (Hot Module Reloading) and toolbar will not work.

Usage

Create a .gmi file in your project, for example:

# 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. Will be provided the title prop. If you do not provide a layout option, Astro's HMR (Hot Module Reloading) and toolbar will not work.

titleFormat

The format to use for the page title. Can be one of:

  • first-heading: The first heading in the document will be used as the title. (default)
  • filename: The filename of the document will be used as the title.

The title is passed to the layout as the title prop.

S
Description
gemtext integration for Astro. Forked from github.com/aspizu/astro-gemtext
Readme MIT 257 KiB
Languages
TypeScript 100%