Files
Xen-Orchestra-xen-orchestra…/docs/docusaurus.config.ts
Olivier Lambert f683817dec feat(docs): working cookieless Matomo tracking on a dedicated site
The previous static/js/matomo.js snippet never loaded the tracker
script, so nothing was ever recorded; it also pointed at site 5, the
XO website. Replace it with the client module from the Vates VMS docs
on the new dedicated docs site (23): cookieless page-view tracking that
follows SPA navigations, and instrumentation of the lunr search box
reporting each settled query with its suggestion count, so zero-result
searches surface missing content. The feedback widget mirrors votes and
thumbs-down reasons as doc_feedback events.

Also fills in the Formbricks IDs for the "XO Docs page feedback"
survey, enabling the feedback widget.
2026-07-27 19:25:51 +02:00

335 lines
8.8 KiB
TypeScript

import { themes as prismThemes } from 'prism-react-renderer'
import type { Config } from '@docusaurus/types'
import type * as Preset from '@docusaurus/preset-classic'
export default {
title: 'Xen Orchestra | XO Documentation',
tagline: 'Discover how to use Xen Orchestra',
favicon: 'img/favicon.ico',
trailingSlash: false,
// Set the production url of your site here
url: 'https://docs.xen-orchestra.com/',
// Set the /<baseUrl>/ pathname under which your site is served
// For GitHub pages deployment, it is often '/<projectName>/'
baseUrl: '/',
// GitHub pages deployment config.
// If you aren't using GitHub pages, you don't need these.
// organizationName: 'facebook', // Usually your GitHub org/user name.
// projectName: 'docusaurus', // Usually your repo name.
onBrokenLinks: 'throw',
// Even if you don't use internationalization, you can use this field to set
// useful metadata like html lang. For example, if your site is Chinese, you
// may want to replace "en" with "zh-Hans".
i18n: {
defaultLocale: 'en',
locales: ['en'],
},
plugins: [
require.resolve('docusaurus-lunr-search'),
[
'@docusaurus/plugin-client-redirects',
{
redirects: [
{
to: '/xo5/manage_infrastructure#vms',
from: '/administration',
},
{
to: '/xo5/advanced',
from: '/advanced',
},
{
to: '/xo5/advanced#alerts',
from: '/alerts',
},
{
to: '/xo5/users#acls',
from: '/acls',
},
{
to: '/xo5/architecture',
from: '/architecture',
},
{
to: '/xo5/architecture#plugins',
from: '/plugins',
},
{
to: '/xo5/backup_howto',
from: '/backup_howto',
},
{
to: '/xo5/backup_reports',
from: '/backup_reports',
},
{
to: '/xo5/backup_troubleshooting',
from: '/backup_troubleshooting',
},
{
to: '/xo5/backups',
from: '/backups',
},
{
to: '/xo6/community',
from: '/community',
},
{
to: '/xo5/configuration',
from: '/configuration',
},
{
to: '/xo5/credential-encryption',
from: '/credential-encryption',
},
{
to: '/xo5/full_backups',
from: '/full_backups',
},
{
to: '/xo5/full_replication',
from: '/full_replication',
},
{
to: '/xo5/immutability',
from: '/immutability',
},
{
to: '/xo5/incremental_backups',
from: '/incremental_backups',
},
{
to: '/xo5/incremental_replication',
from: '/incremental_replication',
},
{
to: '/xo5/installation',
from: '/installation',
},
{
to: '/xo6/support',
from: '/support',
},
{
to: '/xo5/backup',
from: '/backup',
},
{
to: '/xo5/license_management',
from: '/license_management',
},
{
to: '/xo5/load_balancing',
from: '/load_balancing',
},
{
to: '/xo5/manage',
from: '/manage',
},
{
to: '/xo5/manage_infrastructure',
from: '/manage_infrastructure',
},
{
to: '/xo5/mcp',
from: '/mcp',
},
{
to: '/xo5/metadata_backup',
from: '/metadata_backup',
},
{
to: '/xo5/migrate_to_new_xoa',
from: '/migrate_to_new_xoa',
},
{
to: '/xo5/mirror_backup',
from: '/mirror_backup',
},
{
to: '/xo5/object-storage-support',
from: '/object-storage-support',
},
{
to: '/xo5/proxy',
from: '/proxy',
},
{
to: '/xo6/purchase',
from: '/purchase',
},
{
to: '/xo5/releases',
from: '/releases',
},
{
to: '/xo5/restapi',
from: '/restapi',
},
{
to: '/xo5/rolling_snapshots',
from: '/rolling_snapshots',
},
{
to: '/xo5/sdn_controller',
from: '/sdn_controller',
},
{
to: '/xo5/supported_hosts',
from: '/supported_hosts',
},
{
to: '/xo5/troubleshooting',
from: ['/general-troubleshooting', '/troubleshooting']
},
{
to: '/xo5/updater',
from: '/updater',
},
{
to: '/xo5/users',
from: '/users',
},
{
to: '/xo5/v2v-migration-guide',
from: '/v2v-migration-guide',
},
{
to: '/xo5/vm-templates',
from: '/vm-templates',
},
{
to: '/xo5/xoa',
from: '/xoa',
},
],
},
],
],
customFields: {
// Formbricks feedback widget (see src/components/PageFeedback).
// These IDs are client-safe: the widget only talks to the public client API.
formbricks: {
apiHost: 'https://survey.vates.tech',
environmentId: 'cm1t5b3lt000811e86uf67vs8',
surveyId: 'cms3hr8ab005hrw01fvsrsy17',
},
// Cookieless Matomo tracking (see src/clientModules/matomo.ts).
// Site 23 is the dedicated XO docs site (5 is the XO website).
// The site ID is client-visible by nature; an empty one disables
// tracking entirely.
matomo: {
url: 'https://visit.vates.tech/',
siteId: '23',
},
},
clientModules: [require.resolve('./src/clientModules/matomo.ts')],
presets: [
[
'classic',
{
docs: {
routeBasePath: '/',
sidebarPath: './sidebars.ts',
// Please change this to your repo.
// Remove this to remove the "edit this page" links.
editUrl: 'https://github.com/vatesfr/xen-orchestra/tree/master/docs',
},
blog: false,
theme: {
customCss: './src/css/custom.css',
},
} satisfies Preset.Options,
],
],
themeConfig: {
// Replace with your project's social card
image: 'img/vates-xo-logo-smol-new-baseline.png',
navbar: {
title: 'Xen Orchestra Documentation',
logo: { alt: 'Xen Orchestra logo', src: 'img/logo.png', href: '/' },
items: [
{ to: 'https://docs.vates.tech/', label: 'Vates VMS', position: 'right', target: '_self'},
{ to: 'https://docs.xcp-ng.org/', label: 'XCP-ng', position: 'right', target: '_self'},
{ href: '/', label: 'Xen Orchestra', position: 'right' },
],
},
footer: {
style: 'dark',
links: [
{
title: 'Learn',
items: [
{
label: 'About Xen Orchestra',
href: 'https://xen-orchestra.com/#!/xo-home',
},
{
label: 'Introduction',
href: '/',
},
{
label: 'Installation',
href: '/xo5/installation',
},
],
},
{
title: 'Community',
items: [
{
label: 'Forum',
href: 'https://xcp-ng.org/forum',
},
{
label: 'Discord',
href: 'https://discord.gg/Hr98F6wRvx',
},
],
},
{
title: 'Pro Support',
items: [
{
label: 'Vates Stack',
href: 'https://vates.tech',
},
{
label: 'Contact us',
href: 'https://vates.tech/contact',
},
],
},
{
title: 'More',
items: [
{
label: 'News',
href: 'https://xen-orchestra.com/blog/',
},
{
label: 'GitHub',
href: 'https://github.com/vatesfr/xen-orchestra',
},
],
},
],
copyright: `Copyright © ${new Date().getFullYear()} XCP-ng Project, Built with Docusaurus.`,
},
prism: {
theme: prismThemes.github,
darkTheme: prismThemes.dracula,
},
} satisfies Preset.ThemeConfig,
markdown:{
hooks: {
onBrokenMarkdownLinks: 'warn',
},
},
}