plugin-barman-cloud/web/docusaurus.config.ts
Marco Nenciarini 9c84d069ed
fix(docs): fix broken anchor link in concepts.md (#1013)
The heading in misc.md was renamed to "Extra Options for Backup, WAL
Archiving, and Restore", which changed its anchor slug, but the link in
concepts.md still pointed at the old anchor. Update the link in both the
current docs and the affected 0.13.0 versioned snapshot.

Also migrate the deprecated onBrokenMarkdownLinks config option to
markdown.hooks.onBrokenMarkdownLinks, since it will be removed in
Docusaurus v4, and bump the transitive uuid dependency pulled in via
docusaurus/core, docusaurus/preset-classic, and docusaurus-search-local
to a patched version to fix an alert for CVE-2026-41907.

Docusaurus build now completes with no warnings.

Signed-off-by: Marco Nenciarini <marco.nenciarini@enterprisedb.com>
2026-07-17 15:00:16 +02:00

158 lines
4.4 KiB
TypeScript

import {themes as prismThemes} from 'prism-react-renderer';
import type {Config} from '@docusaurus/types';
import type * as Preset from '@docusaurus/preset-classic';
// This runs in Node.js - Don't use client-side code here (browser APIs, JSX...)
const config: Config = {
title: 'Barman Cloud CNPG-I plugin',
favicon: 'img/favicon.ico',
// Set the production url of your site here
url: 'https://cloudnative-pg.github.io',
// Set the /<baseUrl>/ pathname under which your site is served
// For GitHub pages deployment, it is often '/<projectName>/'
baseUrl: '/plugin-barman-cloud/',
trailingSlash: true,
// GitHub pages deployment config.
organizationName: 'cloudnative-pg',
projectName: 'plugin-barman-cloud',
deploymentBranch: 'gh-pages',
onBrokenLinks: 'throw',
markdown: {
hooks: {
onBrokenMarkdownLinks: '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'],
},
presets: [
[
'classic',
{
docs: {
path: 'docs',
sidebarPath: './sidebars.ts',
includeCurrentVersion: true, // Include the current version in the sidebar
versions:{
current:{
label: 'Dev',
badge: true,
banner: "unreleased",
},
}
},
theme: {
customCss: './src/css/custom.css',
},
} satisfies Preset.Options,
],
],
themes: [
[
require.resolve("@easyops-cn/docusaurus-search-local"),
/** @type {import("@easyops-cn/docusaurus-search-local").PluginOptions} */
({
hashed: true,
docsDir: ['docs'],
searchResultLimits: 8,
searchResultContextMaxLength: 50,
language: ["en"],
// Only index headings and content
indexBlog: false,
indexPages: false,
}),
],
],
themeConfig: {
image: 'img/cloudnativepg-social-card.png',
navbar: {
title: 'Barman Cloud CNPG-I plugin',
logo: {
alt: 'CloudNativePG Logo',
src: 'img/logo.svg',
},
items: [
{
type: 'docSidebar',
sidebarId: 'docs',
position: 'left',
label: 'Documentation',
},
{
type: 'docsVersionDropdown',
position: 'right',
},
{
href: "https://github.com/cloudnative-pg/plugin-barman-cloud",
position: "right",
className: "header-github-link",
"aria-label": "GitHub repository",
},
],
},
footer: {
logo: {
alt: 'CloudNativePG Logo',
src: "img/cloudnativepg-landscape-white.png",
href: "https://cloudnative-pg.io",
},
style: 'dark',
links: [
{
title: 'Community',
items: [
{
label: 'Slack',
href: 'https://cloud-native.slack.com/messages/cloudnativepg-users',
},
{
label: 'X',
href: 'https://x.com/CloudNativePG',
},
],
},
{
title: 'More',
items: [
{
label: 'GitHub',
href: 'https://github.com/cloudnative-pg/plugin-barman-cloud',
},
{
label: 'CloudNativePG',
href: 'https://cloudnative-pg.io',
},
],
},
],
copyright: `
Copyright © ${new Date().getFullYear()} CloudNativePG a Series of LF Projects, LLC.<br><br>
For website terms of use, trademark policy and other project policies please see
<a href="https://lfprojects.org/policies/">LF Projects, LLC Policies</a>.<br>
<a href="https://www.linuxfoundation.org/trademark-usage/">The Linux Foundation has registered trademarks and uses trademarks</a>.<br>
<a href="https://www.postgresql.org/about/policies/trademarks">Postgres, PostgreSQL and the Slonik Logo are
trademarks or registered trademarks of the PostgreSQL Community Association of Canada, and
used with their permission</a>.`
},
prism: {
theme: prismThemes.github,
darkTheme: prismThemes.dracula,
},
} satisfies Preset.ThemeConfig,
};
export default config;