From fc7ed81272b0633295e3ae8eda9bd07b32928c16 Mon Sep 17 00:00:00 2001 From: idanlodzki Date: Sun, 2 Aug 2026 19:35:14 +0300 Subject: [PATCH] fix: repair broken doc links and make them fail the build Two links pointed at docs/dashboards/overview, which was deleted in f24aa81 ("adding alerts") along with saving-views.md and service-menu.md. The references were left behind, so both have been dead ever since: docs/providers-services/overview.md:74 docs/providers-services/services/add-services.md:36 Retargeted to dashboards/saved-dashboards, the only page left in that section and the one the sidebar lists. The reason this survived is that onBrokenLinks was 'warn', so Docusaurus printed the problem and exited 0 -- invisible in build output and invisible to CI. Set it to 'throw'. Verified the gate works by pointing a link at a nonexistent page and confirming the build fails. Note this is a different check from the link-check workflow, which validates external URLs in markdown; neither caught these internal route links. Also moved onBrokenMarkdownLinks under markdown.hooks, where Docusaurus 3.10 wants it -- it was warning on every build that v4 will remove the top-level option. Co-Authored-By: Claude Opus 5 (1M context) --- opsimate-docs/docs/providers-services/overview.md | 2 +- .../providers-services/services/add-services.md | 2 +- opsimate-docs/docusaurus.config.js | 13 +++++++++++-- 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/opsimate-docs/docs/providers-services/overview.md b/opsimate-docs/docs/providers-services/overview.md index ead76a1..9b3c6cb 100644 --- a/opsimate-docs/docs/providers-services/overview.md +++ b/opsimate-docs/docs/providers-services/overview.md @@ -71,7 +71,7 @@ Ready to set up your infrastructure monitoring? 1. **[Add Providers](providers/add-provider)** - Connect your infrastructure 2. **[Discover Services](services/add-services)** - Find and import your applications -3. **[Monitor Everything](../dashboards/overview)** - Keep your services healthy +3. **[Monitor Everything](../dashboards/saved-dashboards)** - Keep your services healthy :::tip Pro Tip Start with one provider and let OpsiMate discover its services automatically. You can always add more providers and manually add specific services later! diff --git a/opsimate-docs/docs/providers-services/services/add-services.md b/opsimate-docs/docs/providers-services/services/add-services.md index f3abb6d..fe5db49 100644 --- a/opsimate-docs/docs/providers-services/services/add-services.md +++ b/opsimate-docs/docs/providers-services/services/add-services.md @@ -33,7 +33,7 @@ Based on the provider, you can select the services that are relevant to that spe After adding your services: -1. **[Monitor Services](../../dashboards/overview)** - View service status and metrics +1. **[Monitor Services](../../dashboards/saved-dashboards)** - View service status and metrics 2. **[Set Up Alerts](../../alerts/adding-alerts)** - Get notified of issues :::tip Pro Tip diff --git a/opsimate-docs/docusaurus.config.js b/opsimate-docs/docusaurus.config.js index 65e2d65..d8569d5 100644 --- a/opsimate-docs/docusaurus.config.js +++ b/opsimate-docs/docusaurus.config.js @@ -8,8 +8,17 @@ module.exports = { organizationName: 'OpsiMate', projectName: 'documentation', - onBrokenLinks: 'warn', - onBrokenMarkdownLinks: 'warn', + // 'throw' so a broken link fails CI instead of scrolling past in build + // output. Two links to a page deleted months earlier survived this way. + onBrokenLinks: 'throw', + + markdown: { + hooks: { + // Moved from the top-level onBrokenMarkdownLinks, which Docusaurus 3.10 + // deprecates and v4 removes. + onBrokenMarkdownLinks: 'warn', + }, + }, presets: [ [