shulkerscript-webpage/astro.config.mjs

136 lines
3.6 KiB
JavaScript
Raw Permalink Normal View History

import { defineConfig } from "astro/config";
import starlight from "@astrojs/starlight";
2024-06-21 19:26:02 +02:00
import react from "@astrojs/react";
2024-10-01 02:34:37 +02:00
// import starlightLinksValidator from "starlight-links-validator";
import starlightUtils from "@lorenzo_lewis/starlight-utils";
2024-10-01 01:17:28 +02:00
import wasm from "vite-plugin-wasm";
import shikiConfig from "./src/utils/shiki";
const playgroundSidebarEntry = {
2024-10-01 02:34:37 +02:00
label: 'Playground',
link: '/playground',
translations: { de: 'Spielplatz' },
};
const navLinks = [playgroundSidebarEntry];
2024-04-03 00:09:47 +02:00
// https://astro.build/config
export default defineConfig({
site: "https://shulkerscript.hoelting.dev",
2024-04-03 00:09:47 +02:00
integrations: [
react(),
2024-04-03 00:09:47 +02:00
starlight({
2024-09-30 17:23:40 +02:00
title: 'Shulkerscript',
2024-04-03 00:09:47 +02:00
logo: {
src: './src/assets/logo.webp',
2024-09-30 17:23:40 +02:00
alt: 'Shulkerscript Logo',
2024-04-03 00:09:47 +02:00
},
favicon: '/favicon.ico',
description: 'A simple and powerful scripting language for Minecraft datapacks.',
social: {
2024-09-22 00:12:57 +02:00
email: 'mailto:shulkerscript@hoelting.dev',
2024-04-03 00:09:47 +02:00
},
tableOfContents: { minHeadingLevel: 1, maxHeadingLevel: 3 },
defaultLocale: 'root',
locales: {
root: {
label: 'English',
lang: 'en',
},
de: {
label: 'Deutsch',
lang: 'de',
},
},
editLink: {
baseUrl: 'https://github.com/moritz-hoelting/shulkerscript-webpage/edit/main',
},
customCss: ['./src/styles/style.css'],
2024-10-01 02:34:37 +02:00
plugins: [starlightUtils({
navLinks: {
leading: {
useSidebarLabelled: "leadingNavLinks",
},
2024-10-01 02:34:37 +02:00
},
}),
// starlightLinksValidator({
// errorOnFallbackPages: false,
// })
],
2024-04-03 00:09:47 +02:00
expressiveCode: {
shiki: shikiConfig,
},
2024-09-22 00:12:57 +02:00
components: {
PageTitle: "./src/components/override/PageTitle.astro",
ContentPanel: "./src/components/override/ContentPanel.astro",
2024-08-15 21:41:29 +02:00
Pagination: "./src/components/override/Pagination.astro",
2024-09-22 00:12:57 +02:00
SocialIcons: './src/components/override/SocialIcons.astro',
},
2024-04-03 00:09:47 +02:00
sidebar: [
{
label: "leadingNavLinks",
items: navLinks,
},
2024-04-03 00:09:47 +02:00
{
label: 'Guides',
autogenerate: {
directory: 'guides',
},
translations: {
de: 'Anleitungen',
}
},
{
label: "More",
translations: {
de: "Mehr",
},
items: [
{
label: "Roadmap",
link: "/roadmap",
translations: {
de: "Zukunftspläne",
},
},
2024-10-01 02:34:37 +02:00
{
label: 'Differences to other languages',
link: '/differences',
translations: {
de: 'Unterschiede zu anderen Sprachen',
},
},
2024-06-27 10:59:13 +02:00
{
...playgroundSidebarEntry,
badge: {
text: "WIP",
variant: "caution",
},
},
],
},
2024-04-03 00:09:47 +02:00
{
label: 'Reference',
autogenerate: {
directory: 'reference',
},
collapsed: true,
translations: {
de: 'Referenz',
},
2024-04-03 00:09:47 +02:00
badge: {
text: 'WIP',
variant: 'caution',
}
}
]
}),
],
2024-10-01 01:17:28 +02:00
vite: {
plugins: [
wasm(),
],
}
2024-04-03 00:09:47 +02:00
});