Skip to content

Getting Started

A Starlight plugin to publish Obsidian vaults to a Starlight website.

Check out the demo for a preview of the generated pages.

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.

Install the plugin

Starlight Obsidian is a Starlight plugin. Install it using your favorite package manager:

Terminal window
npm install starlight-obsidian

Configure the plugin

The Starlight Obsidian plugin can be configured in your Starlight configuration in the astro.config.mjs file. The minimal configuration requires a vault option to point to the path of your Obsidian vault.

astro.config.mjs
import starlight from '@astrojs/starlight'
import { defineConfig } from 'astro/config'
import starlightObsidian, { obsidianSidebarGroup } from 'starlight-obsidian'
export default defineConfig({
integrations: [
starlight({
plugins: [
// Generate the Obsidian vault pages.
starlightObsidian({
vault: '../path/to/obsidian/vault',
}),
],
sidebar: [
{
label: 'Guides',
items: [{ label: 'Example Guide', link: '/guides/example/' }],
},
// Add the generated sidebar group to the sidebar.
obsidianSidebarGroup,
],
title: 'My Docs',
}),
],
})

To preview the generated pages, you can start the development server. The Starlight Obsidian plugin behavior can be tweaked using various configuration options.