1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
|
import { defineConfig } from 'astro/config';
import starlight from '@astrojs/starlight';
const repoBlob = 'https://github.com/ogulcancelik/herdr/blob/master/';
function rewriteHerdrLinks() {
const docsLinks = new Map([
['README.md', '/docs/'],
['./README.md', '/docs/'],
['CONFIGURATION.md', '/docs/configuration/'],
['./CONFIGURATION.md', '/docs/configuration/'],
['INTEGRATIONS.md', '/docs/integrations/'],
['./INTEGRATIONS.md', '/docs/integrations/'],
['SOCKET_API.md', '/docs/socket-api/'],
['./SOCKET_API.md', '/docs/socket-api/'],
['SKILL.md', '/docs/agent-skill/'],
['./SKILL.md', '/docs/agent-skill/'],
]);
return function transform(tree) {
walk(tree, (node) => {
if (!node || (node.type !== 'link' && node.type !== 'definition')) return;
if (typeof node.url !== 'string') return;
const [path, suffix = ''] = node.url.split(/(?=[#?])/);
const mapped = docsLinks.get(path);
if (mapped) {
node.url = `${mapped}${suffix}`;
return;
}
const sourcePath = path.startsWith('./') ? path.slice(2) : path;
if (
sourcePath.startsWith('src/') ||
sourcePath.startsWith('scripts/') ||
sourcePath.startsWith('assets/')
) {
node.url = `${repoBlob}${sourcePath}${suffix}`;
}
});
};
}
function walk(node, visitor) {
visitor(node);
if (!node || !Array.isArray(node.children)) return;
for (const child of node.children) walk(child, visitor);
}
export default defineConfig({
site: 'https://herdr.dev',
integrations: [
starlight({
title: 'herdr',
description: 'Terminal-native agent runtime and multiplexer.',
favicon: '/assets/favicon.png?v=14',
social: [
{
icon: 'github',
label: 'GitHub',
href: 'https://github.com/ogulcancelik/herdr',
},
],
components: {
Header: './src/components/Header.astro',
Sidebar: './src/components/Sidebar.astro',
SiteTitle: './src/components/SiteTitle.astro',
},
customCss: ['./src/styles/starlight.css'],
head: [
{
tag: 'meta',
attrs: { property: 'og:image', content: 'https://herdr.dev/assets/og-card-v8.png' },
},
{ tag: 'meta', attrs: { property: 'og:image:width', content: '1200' } },
{ tag: 'meta', attrs: { property: 'og:image:height', content: '630' } },
{
tag: 'meta',
attrs: {
property: 'og:image:alt',
content: 'Herdr documentation — One terminal. The whole herd.',
},
},
{
tag: 'meta',
attrs: { name: 'twitter:image', content: 'https://herdr.dev/assets/og-card-v8.png' },
},
{
tag: 'meta',
attrs: {
name: 'twitter:image:alt',
content: 'Herdr documentation — One terminal. The whole herd.',
},
},
],
editLink: {
baseUrl: 'https://github.com/ogulcancelik/herdr/edit/master/',
},
lastUpdated: true,
disable404Route: true,
sidebar: [
{
label: 'Start here',
items: [
{ label: 'Overview', slug: 'docs' },
{ label: 'Install', slug: 'docs/install' },
{ label: 'Quick start', slug: 'docs/quick-start' },
{ label: 'Concepts', slug: 'docs/concepts' },
{ label: 'Keyboard', slug: 'docs/keyboard' },
{ label: 'How to work with Herdr', slug: 'docs/how-to-work' },
],
},
{
label: 'Core guides',
items: [
{ label: 'Agents', slug: 'docs/agents' },
{ label: 'Session state and restore', slug: 'docs/session-state' },
{ label: 'Persistence and remote access', slug: 'docs/persistence-remote' },
{ label: 'Configuration', slug: 'docs/configuration' },
],
},
{
label: 'Plugins',
items: [
{ label: 'Plugins', slug: 'docs/plugins' },
{ label: 'Marketplace', slug: 'docs/marketplace' },
],
},
{
label: 'Reference',
items: [
{ label: 'CLI reference', slug: 'docs/cli-reference' },
{ label: 'Socket API', slug: 'docs/socket-api' },
{ label: 'Integrations', slug: 'docs/integrations' },
{ label: 'Agent skill file', slug: 'docs/agent-skill' },
{ label: 'Windows beta', slug: 'docs/windows-beta' },
],
},
{
label: 'Updates',
items: [
{ label: 'Preview docs', slug: 'docs/preview' },
],
},
],
}),
],
markdown: {
remarkPlugins: [rewriteHerdrLinks],
},
});
|