docs/docusaurus.config.ts

92 lines
2.5 KiB
TypeScript
Raw Normal View History

2025-08-19 11:21:08 +00:00
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: "TP-Docs",
tagline: "Your Source of Truth for Engineering Docs",
favicon: "img/favicon.png",
2025-08-25 06:40:55 +00:00
future: { v4: true },
2025-08-19 11:21:08 +00:00
2025-08-25 06:40:55 +00:00
url: "https://docs.dffm.it",
baseUrl: "/",
2025-08-19 11:21:08 +00:00
2025-08-25 06:40:55 +00:00
organizationName: "marco.costalunga",
projectName: "tp-docs",
2025-08-19 11:21:08 +00:00
onBrokenLinks: "throw",
onBrokenMarkdownLinks: "warn",
2025-08-25 06:40:55 +00:00
i18n: { defaultLocale: "it", locales: ["it"] },
2025-08-19 11:21:08 +00:00
presets: [
[
"classic",
{
2025-08-25 06:40:55 +00:00
theme: { customCss: "./src/css/custom.css" },
2025-08-19 11:21:08 +00:00
docs: {
sidebarPath: "./sidebars.ts",
2025-08-25 06:40:55 +00:00
editUrl: "https://gitlab.dffm.it/giuseppe/docs/-/edit/main/",
2025-08-19 11:21:08 +00:00
},
blog: {
showReadingTime: true,
2025-08-25 06:40:55 +00:00
feedOptions: { type: ["rss", "atom"], xslt: true },
editUrl: "https://gitlab.dffm.it/giuseppe/docs/-/edit/main/",
onInlineTags: "warn",
onInlineAuthors: "warn",
onUntruncatedBlogPosts: "warn",
2025-08-19 11:21:08 +00:00
},
} satisfies Preset.Options,
],
],
themes: [
2025-08-25 06:40:55 +00:00
"@docusaurus/theme-mermaid", // ✅ aggiunta qui
2025-08-19 11:21:08 +00:00
[
require.resolve("@easyops-cn/docusaurus-search-local"),
2025-08-25 06:40:55 +00:00
{ hashed: true, language: ["it"] },
2025-08-19 11:21:08 +00:00
],
],
plugins: [
[
"@docusaurus/plugin-pwa",
{
debug: true,
2025-08-25 06:40:55 +00:00
offlineModeActivationStrategies: ["appInstalled", "standalone", "queryString"],
2025-08-19 11:21:08 +00:00
pwaHead: [
2025-08-25 06:40:55 +00:00
{ tagName: "link", rel: "icon", href: "/img/favicon.png" },
{ tagName: "link", rel: "manifest", href: "/manifest.json" },
{ tagName: "meta", name: "theme-color", content: "rgb(37, 194, 160)" },
2025-08-19 11:21:08 +00:00
],
},
],
],
2025-08-25 06:40:55 +00:00
markdown: { mermaid: true }, // ✅ abilita parsing mermaid nei .md/.mdx
2025-08-19 11:21:08 +00:00
themeConfig: {
image: "img/docusaurus-social-card.jpg",
navbar: {
title: "TP-Docs",
2025-08-25 06:40:55 +00:00
logo: { alt: "My Site Logo", src: "img/favicon.png" },
2025-08-19 11:21:08 +00:00
items: [
2025-08-25 06:40:55 +00:00
{ type: "docSidebar", sidebarId: "docSidebar", position: "left", label: "Documentazione" },
{ to: "/blog", label: "Blog", position: "left" },
2025-08-19 11:21:08 +00:00
],
},
footer: {
style: "dark",
copyright: `Copyright © ${new Date().getFullYear()} Tecno Pack SPA. Built with Docusaurus.`,
},
prism: {
theme: prismThemes.github,
darkTheme: prismThemes.vsDark,
2025-08-25 06:40:55 +00:00
additionalLanguages: ["yaml", "csharp", "iecst", "bash"],
2025-08-19 11:21:08 +00:00
},
} satisfies Preset.ThemeConfig,
};
export default config;