@lunariajs/starlight
The @lunariajs/starlight
package integrates Lunaria into the Starlight documentation theme for Astro.
Read the official Lunaria documentation to learn more about it.
Installation
You can install @lunariajs/starlight
using your preferred package manager:
npm install @lunariajs/starlight
pnpm add @lunariajs/starlight
yarn add @lunariajs/starlight
Basic Usage
Start using @lunariajs/starlight
by setting up your own lunaria.config.json
file and adding the provided integration to your astro.config.*
file.
{
"repository": {
"name": "me/cool-docs"
}
}
When using @lunariajs/starlight
you only need to provide a repository
field to get started, as defaultLocale
, locales
, and files
can be generated by enabling sync
in the integration's configuration. Do run astro build
one first time before other commands to avoid validation errors during development.
import starlight from '@astrojs/starlight';
import lunaria from '@lunariajs/starlight';
import { defineConfig } from 'astro/config';
export default defineConfig({
integrations: [
starlight({
plugins: [
lunaria({
configPath: './lunaria.config.json',
route: '/lunaria',
sync: false,
}),
],
}),
],
});
After setting up the integration, you can run astro dev
or astro build
and go to the specified route, e.g. https://localhost:4321/lunaria
to see your localization dashboard.