Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
214 changes: 116 additions & 98 deletions astro.config.mjs
Original file line number Diff line number Diff line change
@@ -1,206 +1,224 @@
import { defineConfig } from 'astro/config';
import starlight from '@astrojs/starlight';
import starlightLinksValidator from 'starlight-links-validator';
import starlightThemeRapide from 'starlight-theme-rapide';
import starlightSidebarTopics from 'starlight-sidebar-topics';
import svelte from '@astrojs/svelte';
import tailwindcss from '@tailwindcss/vite';
import mermaid from 'astro-mermaid';
import { defineConfig } from "astro/config";
import starlight from "@astrojs/starlight";
import starlightLinksValidator from "starlight-links-validator";
import starlightThemeRapide from "starlight-theme-rapide";
import starlightSidebarTopics from "starlight-sidebar-topics";
import svelte from "@astrojs/svelte";
import tailwindcss from "@tailwindcss/vite";
import mermaid from "astro-mermaid";

import { posthogCode } from './posthog.mjs';
import { posthogCode } from "./posthog.mjs";

const isProd = import.meta.env.PROD;

// Head tags for the site
let head = [
// OG image
{
tag: 'meta',
tag: "meta",
attrs: {
property: 'og:image',
content: 'https://docs.endor.dev/og.webp'
}
property: "og:image",
content: "https://docs.endor.dev/og.webp",
},
},
];

if (isProd) {
head.push({
tag: 'script',
content: posthogCode
tag: "script",
content: posthogCode,
});
}

// https://astro.build/config
export default defineConfig({
redirects: {
// MCP redirects
'/mcp/overview': {
"/mcp/overview": {
status: 302,
destination: '/cli/mcp/overview',
destination: "/cli/mcp/overview",
},
'/mcp/claude-code': {
"/mcp/claude-code": {
status: 302,
destination: '/cli/mcp/claude-code',
destination: "/cli/mcp/claude-code",
},
'/mcp/cursor': {
"/mcp/cursor": {
status: 302,
destination: '/cli/mcp/cursor',
destination: "/cli/mcp/cursor",
},
'/mcp/goose': {
"/mcp/goose": {
status: 302,
destination: '/cli/mcp/goose',
destination: "/cli/mcp/goose",
},
'/mcp/vscode': {
"/mcp/vscode": {
status: 302,
destination: '/cli/mcp/vscode',
destination: "/cli/mcp/vscode",
},
'/mcp/windsurf': {
"/mcp/windsurf": {
status: 302,
destination: '/cli/mcp/windsurf',
destination: "/cli/mcp/windsurf",
},
// Rover redirects
'/rover/overview': {
"/rover/overview": {
status: 301,
destination: '/rover/intro/overview',
destination: "/rover/intro/overview",
},
'/rover/quickstart': {
"/rover/quickstart": {
status: 301,
destination: '/rover/intro/quickstart',
destination: "/rover/intro/quickstart",
},
'/rover/common-workflows': {
"/rover/common-workflows": {
status: 301,
destination: '/rover/intro/quickstart',
destination: "/rover/intro/quickstart",
},
'/rover/vscode-extension': {
"/rover/vscode-extension": {
status: 301,
destination: '/rover/intro/vscode-extension',
destination: "/rover/intro/vscode-extension",
},
'/rover/command-reference': {
"/rover/command-reference": {
status: 301,
destination: '/rover/reference/cli-reference/',
destination: "/rover/reference/cli-reference/",
},
},
integrations: [
// @see https://github.com/joesaby/astro-mermaid?tab=readme-ov-file#integration-order-important
mermaid({
theme: 'forest',
autoTheme: true
theme: "forest",
autoTheme: true,
}),
starlight({
title: 'Endor Documentation',
title: "Endor Documentation",
plugins: [
starlightLinksValidator(),
starlightThemeRapide(),
starlightSidebarTopics([
{
label: 'Rover',
link: '/rover/intro/overview',
icon: 'seti:bicep',
label: "Rover",
link: "/rover/intro/overview",
icon: "seti:bicep",
items: [
{
label: 'Introduction',
autogenerate: { directory: 'rover/intro' },
label: "Introduction",
autogenerate: { directory: "rover/intro" },
},
{
label: "Key Concepts",
autogenerate: { directory: "rover/concepts" },
},
{
label: 'Key Concepts',
autogenerate: { directory: 'rover/concepts' },
label: "Guides",
autogenerate: { directory: "rover/guides" },
},
{
label: 'Guides',
autogenerate: { directory: 'rover/guides' },
label: "Advanced",
autogenerate: { directory: "rover/advanced" },
},
{
label: 'Reference',
autogenerate: { directory: 'rover/reference' },
label: "Reference",
autogenerate: { directory: "rover/reference" },
},
{
label: 'Troubleshooting',
autogenerate: { directory: 'rover/troubleshooting' },
}
label: "Troubleshooting",
autogenerate: { directory: "rover/troubleshooting" },
},
],
},
{
label: 'Endor CLI',
link: '/cli/overview',
icon: 'forward-slash',
label: "Endor CLI",
link: "/cli/overview",
icon: "forward-slash",
items: [
{
label: 'CLI',
label: "CLI",
items: [
{
label: 'Overview',
link: '/cli/overview',
label: "Overview",
link: "/cli/overview",
},
{
label: 'Setup',
link: '/cli/setup',
label: "Setup",
link: "/cli/setup",
},
{
label: 'MCP',
autogenerate: { directory: 'cli/mcp' }
label: "MCP",
autogenerate: { directory: "cli/mcp" },
},
{
label: 'Networking',
link: '/cli/networking',
label: "Networking",
link: "/cli/networking",
},
{
label: 'Volumes',
link: '/cli/volumes',
label: "Volumes",
link: "/cli/volumes",
},
{
label: 'Commands',
link: '/cli/commands',
label: "Commands",
link: "/cli/commands",
},
{
label: 'Open a Shell',
link: '/cli/shell',
label: "Open a Shell",
link: "/cli/shell",
},
{
label: 'Services',
autogenerate: { directory: 'cli/services' },
}
label: "Services",
autogenerate: { directory: "cli/services" },
},
],
}
},
],
},
{
label: 'Endor Web',
link: '/faq/',
icon: 'seti:html',
label: "Endor Web",
link: "/faq/",
icon: "seti:html",
items: [
{
label: 'FAQ',
autogenerate: { directory: 'faq' },
label: "FAQ",
autogenerate: { directory: "faq" },
},
{
label: 'Reference',
autogenerate: { directory: 'reference' },
label: "Reference",
autogenerate: { directory: "reference" },
},
{
label: 'Guides',
autogenerate: { directory: 'guides' },
label: "Guides",
autogenerate: { directory: "guides" },
},
],
},
]),
],
head,
customCss: [
'./src/styles/global.css'
],
customCss: ["./src/styles/global.css"],
logo: {
dark: './src/assets/logo-text-dark.png',
light: './src/assets/logo-text.png',
alt: 'Endor Logo',
dark: "./src/assets/logo-text-dark.png",
light: "./src/assets/logo-text.png",
alt: "Endor Logo",
replacesTitle: true,
},
social: [
{ icon: 'github', label: 'GitHub', href: 'https://github.com/endorhq' },
{ icon: 'mastodon', label: 'Mastodon', href: 'https://mastodon.social/@endorhq' },
{ icon: 'twitter', label: 'X', href: 'https://x.com/endorhq' },
{ icon: 'blueSky', label: 'BlueSky', href: 'https://bsky.app/profile/endorhq.bsky.social' },
{ icon: 'youtube', label: 'YouTube', href: 'https://www.youtube.com/@endorhq' },
{ icon: 'linkedin', label: 'LinkedIn', href: 'https://www.linkedin.com/company/endorhq' },
{ icon: "github", label: "GitHub", href: "https://github.com/endorhq" },
{
icon: "mastodon",
label: "Mastodon",
href: "https://mastodon.social/@endorhq",
},
{ icon: "twitter", label: "X", href: "https://x.com/endorhq" },
{
icon: "blueSky",
label: "BlueSky",
href: "https://bsky.app/profile/endorhq.bsky.social",
},
{
icon: "youtube",
label: "YouTube",
href: "https://www.youtube.com/@endorhq",
},
{
icon: "linkedin",
label: "LinkedIn",
href: "https://www.linkedin.com/company/endorhq",
},
],
}),
svelte(),
Expand All @@ -209,4 +227,4 @@ export default defineConfig({
vite: {
plugins: [tailwindcss()],
},
});
});
Loading