Skip to content

Getting Started

A Starlight plugin to write your documentation using F# files.

You need to have a Starlight project set up. If you don’t have one, you can create a new Starlight project by following the official Starlight documentation.

This plugin also requires Node.js 22.12.0 or later.

  1. Install the plugin using your favorite package manager:

    Terminal window
    npm install starlight-fsharp-literate
  2. Configure the plugin in your astro.config.mjs file:

    import { defineConfig } from 'astro/config';
    import starlight from '@astrojs/starlight';
    import fsharpLiterate from 'starlight-fsharp-literate';
    export default defineConfig({
    integrations: [
    fsharpLiterate(),
    starlight({
    // ... your Starlight config
    })
    ]
    });
  3. You can now write *.source.fsx files in your documentation pages in src/content/docs/ and the plugin will automatically generate a corresponding *.mdx file that goes through Starlight’s pipeline.