Skip to content

Getting Started

A Starlight plugin adding different view mode capabilities to your documentation website.

  • No client-side third-party dependencies
  • Mobile support is working for Zen Mode
  • Many options to configurate plugin for your website (look here)
  • Zen mode and more to come…

Check out the demo for a preview of the plugin in action.

Prerequisites

You will need to have a Starlight website set up. If you don’t have one yet, you can follow the “Getting Started” guide in the Starlight docs to create one.

Installation

  1. Starlight View Modes is a Starlight plugin that you can install using your favorite package manager:

    Terminal window
    npm i starlight-view-modes
  2. Configure the plugin in your Starlight configuration in the astro.config.mjs file.

    astro.config.mjs
    import starlight from '@astrojs/starlight'
    import { defineConfig } from 'astro/config'
    import starlightViewModes from 'starlight-view-modes'
    export default defineConfig({
    integrations: [
    starlight({
    plugins: [starlightViewModes()],
    title: 'My Docs',
    }),
    ],
    })
  3. Start the development server to see the plugin in action.

The Starlight View Modes plugin behavior can be tweaked using various configuration options.