Add @easyops-cn/docusaurus-search-local (v0.55.1) for offline/local full-text search across all documentation pages. - Search bar appears in the navbar (Ctrl/Cmd+K shortcut) - Builds a search index at build time — no external service needed - Highlights matched terms on target page after clicking a result - Dedicated /search page for expanded results - Blog indexing disabled (blog is off) - docsRouteBasePath set to '/' to match existing docs routing
135 lines
3.5 KiB
TypeScript
135 lines
3.5 KiB
TypeScript
import {themes as prismThemes} from 'prism-react-renderer';
|
|
import type {Config} from '@docusaurus/types';
|
|
import type * as Preset from '@docusaurus/preset-classic';
|
|
|
|
const config: Config = {
|
|
title: 'Hermes Agent',
|
|
tagline: 'The self-improving AI agent',
|
|
favicon: 'img/favicon.ico',
|
|
|
|
url: 'https://hermes-agent.nousresearch.com',
|
|
baseUrl: '/docs/',
|
|
|
|
organizationName: 'NousResearch',
|
|
projectName: 'hermes-agent',
|
|
|
|
onBrokenLinks: 'warn',
|
|
|
|
markdown: {
|
|
hooks: {
|
|
onBrokenMarkdownLinks: 'warn',
|
|
},
|
|
},
|
|
|
|
i18n: {
|
|
defaultLocale: 'en',
|
|
locales: ['en'],
|
|
},
|
|
|
|
themes: [
|
|
[
|
|
require.resolve('@easyops-cn/docusaurus-search-local'),
|
|
/** @type {import("@easyops-cn/docusaurus-search-local").PluginOptions} */
|
|
({
|
|
hashed: true,
|
|
language: ['en'],
|
|
indexBlog: false,
|
|
docsRouteBasePath: '/',
|
|
highlightSearchTermsOnTargetPage: true,
|
|
}),
|
|
],
|
|
],
|
|
|
|
presets: [
|
|
[
|
|
'classic',
|
|
{
|
|
docs: {
|
|
routeBasePath: '/', // Docs at the root of /docs/
|
|
sidebarPath: './sidebars.ts',
|
|
editUrl: 'https://github.com/NousResearch/hermes-agent/edit/main/website/',
|
|
},
|
|
blog: false,
|
|
theme: {
|
|
customCss: './src/css/custom.css',
|
|
},
|
|
} satisfies Preset.Options,
|
|
],
|
|
],
|
|
|
|
themeConfig: {
|
|
image: 'img/hermes-agent-banner.png',
|
|
colorMode: {
|
|
defaultMode: 'dark',
|
|
respectPrefersColorScheme: true,
|
|
},
|
|
navbar: {
|
|
title: 'Hermes Agent',
|
|
logo: {
|
|
alt: 'Hermes Agent',
|
|
src: 'img/logo.png',
|
|
},
|
|
items: [
|
|
{
|
|
type: 'docSidebar',
|
|
sidebarId: 'docs',
|
|
position: 'left',
|
|
label: 'Docs',
|
|
},
|
|
{
|
|
href: 'https://hermes-agent.nousresearch.com',
|
|
label: 'Home',
|
|
position: 'right',
|
|
},
|
|
{
|
|
href: 'https://github.com/NousResearch/hermes-agent',
|
|
label: 'GitHub',
|
|
position: 'right',
|
|
},
|
|
{
|
|
href: 'https://discord.gg/NousResearch',
|
|
label: 'Discord',
|
|
position: 'right',
|
|
},
|
|
],
|
|
},
|
|
footer: {
|
|
style: 'dark',
|
|
links: [
|
|
{
|
|
title: 'Docs',
|
|
items: [
|
|
{ label: 'Getting Started', to: '/getting-started/quickstart' },
|
|
{ label: 'User Guide', to: '/user-guide/cli' },
|
|
{ label: 'Developer Guide', to: '/developer-guide/architecture' },
|
|
{ label: 'Reference', to: '/reference/cli-commands' },
|
|
],
|
|
},
|
|
{
|
|
title: 'Community',
|
|
items: [
|
|
{ label: 'Discord', href: 'https://discord.gg/NousResearch' },
|
|
{ label: 'GitHub Discussions', href: 'https://github.com/NousResearch/hermes-agent/discussions' },
|
|
{ label: 'Skills Hub', href: 'https://agentskills.io' },
|
|
],
|
|
},
|
|
{
|
|
title: 'More',
|
|
items: [
|
|
{ label: 'GitHub', href: 'https://github.com/NousResearch/hermes-agent' },
|
|
{ label: 'Nous Research', href: 'https://nousresearch.com' },
|
|
],
|
|
},
|
|
],
|
|
copyright: `Built by <a href="https://nousresearch.com">Nous Research</a> · MIT License · ${new Date().getFullYear()}`,
|
|
},
|
|
prism: {
|
|
theme: prismThemes.github,
|
|
darkTheme: prismThemes.dracula,
|
|
additionalLanguages: ['bash', 'yaml', 'json', 'python', 'toml'],
|
|
},
|
|
} satisfies Preset.ThemeConfig,
|
|
};
|
|
|
|
export default config;
|