]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
Add astro-broken-links-checker to detect and fix broken internal links (#42099)
authorJulien Déramond <juderamond@gmail.com>
Wed, 11 Mar 2026 17:51:35 +0000 (18:51 +0100)
committerGitHub <noreply@github.com>
Wed, 11 Mar 2026 17:51:35 +0000 (18:51 +0100)
16 files changed:
package-lock.json
package.json
site/astro.config.ts
site/data/plugins.yml
site/src/assets/examples/cheatsheet-rtl/index.astro
site/src/assets/examples/cheatsheet/index.astro
site/src/content/docs/content/typography.mdx
site/src/content/docs/forms/datepicker.mdx
site/src/content/docs/forms/form-adorn.mdx
site/src/content/docs/forms/otp-input.mdx
site/src/content/docs/forms/overview.mdx
site/src/content/docs/getting-started/install.mdx
site/static/docs/[version]/assets/img/examples/dialogs.png [new file with mode: 0644]
site/static/docs/[version]/assets/img/examples/dialogs@2x.png [new file with mode: 0644]
site/static/docs/[version]/assets/img/examples/modals.png [deleted file]
site/static/docs/[version]/assets/img/examples/modals@2x.png [deleted file]

index 753fd7d7422fdc855e86c445030f70cfdd868297..ef300a5d60fc0efd1d230b7790db655cb9b96cb9 100644 (file)
@@ -40,6 +40,7 @@
         "@types/prismjs": "^1.26.5",
         "astro": "^5.16.6",
         "astro-auto-import": "^0.4.5",
+        "astro-broken-links-checker": "^1.0.6",
         "autoprefixer": "^10.4.23",
         "bootstrap-vscode-theme": "^0.0.9",
         "bundlewatch": "^0.4.1",
         "astro": "^2.0.0 || ^3.0.0-beta || ^4.0.0-beta || ^5.0.0-beta"
       }
     },
+    "node_modules/astro-broken-links-checker": {
+      "version": "1.0.6",
+      "resolved": "https://registry.npmjs.org/astro-broken-links-checker/-/astro-broken-links-checker-1.0.6.tgz",
+      "integrity": "sha512-otAodaegzAeEPCRJB+ED2IyHlxTQcFsJDP+2O3kGk/MDYbhr+u7qxZQHtZuSfg9p5aGu40Ayk7z7ayVR6kQSpA==",
+      "dev": true,
+      "license": "Apache-2.0",
+      "dependencies": {
+        "fast-glob": "^3.3.2",
+        "node-fetch": "^3.3.2",
+        "node-html-parser": "^6.1.13",
+        "p-limit": "^6.1.0"
+      }
+    },
     "node_modules/astro/node_modules/semver": {
       "version": "7.7.3",
       "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.3.tgz",
       "dev": true,
       "license": "MIT"
     },
+    "node_modules/data-uri-to-buffer": {
+      "version": "4.0.1",
+      "resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-4.0.1.tgz",
+      "integrity": "sha512-0R9ikRb668HB7QDxT1vkpuUBtqc53YyAwMwGeUFKRojY/NWKvdZ+9UYtRfGmhqNbRkTSVpMbmyhXipFFv2cb/A==",
+      "dev": true,
+      "license": "MIT",
+      "engines": {
+        "node": ">= 12"
+      }
+    },
     "node_modules/data-view-buffer": {
       "version": "1.0.2",
       "resolved": "https://registry.npmjs.org/data-view-buffer/-/data-view-buffer-1.0.2.tgz",
         }
       }
     },
+    "node_modules/fetch-blob": {
+      "version": "3.2.0",
+      "resolved": "https://registry.npmjs.org/fetch-blob/-/fetch-blob-3.2.0.tgz",
+      "integrity": "sha512-7yAQpD2UMJzLi1Dqv7qFYnPbaPx7ZfFK6PiIxQ4PfkGPyNyl2Ugx+a/umUonmKqjhM4DnfbMvdX6otXq83soQQ==",
+      "dev": true,
+      "funding": [
+        {
+          "type": "github",
+          "url": "https://github.com/sponsors/jimmywarting"
+        },
+        {
+          "type": "paypal",
+          "url": "https://paypal.me/jimmywarting"
+        }
+      ],
+      "license": "MIT",
+      "dependencies": {
+        "node-domexception": "^1.0.0",
+        "web-streams-polyfill": "^3.0.3"
+      },
+      "engines": {
+        "node": "^12.20 || >= 14.13"
+      }
+    },
     "node_modules/file-entry-cache": {
       "version": "6.0.1",
       "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz",
         "node": ">= 6"
       }
     },
+    "node_modules/formdata-polyfill": {
+      "version": "4.0.10",
+      "resolved": "https://registry.npmjs.org/formdata-polyfill/-/formdata-polyfill-4.0.10.tgz",
+      "integrity": "sha512-buewHzMvYL29jdeQTVILecSaZKnt/RJWjoZCF5OW60Z67/GmSLBkOFM7qh1PI3zFNtJbaZL5eQu1vLfazOwj4g==",
+      "dev": true,
+      "license": "MIT",
+      "dependencies": {
+        "fetch-blob": "^3.1.2"
+      },
+      "engines": {
+        "node": ">=12.20.0"
+      }
+    },
     "node_modules/fraction.js": {
       "version": "5.3.4",
       "resolved": "https://registry.npmjs.org/fraction.js/-/fraction.js-5.3.4.tgz",
         "url": "https://opencollective.com/unified"
       }
     },
+    "node_modules/he": {
+      "version": "1.2.0",
+      "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz",
+      "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==",
+      "dev": true,
+      "license": "MIT",
+      "bin": {
+        "he": "bin/he"
+      }
+    },
     "node_modules/hookified": {
       "version": "1.15.0",
       "resolved": "https://registry.npmjs.org/hookified/-/hookified-1.15.0.tgz",
       "license": "MIT",
       "optional": true
     },
+    "node_modules/node-domexception": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/node-domexception/-/node-domexception-1.0.0.tgz",
+      "integrity": "sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ==",
+      "deprecated": "Use your platform's native DOMException instead",
+      "dev": true,
+      "funding": [
+        {
+          "type": "github",
+          "url": "https://github.com/sponsors/jimmywarting"
+        },
+        {
+          "type": "github",
+          "url": "https://paypal.me/jimmywarting"
+        }
+      ],
+      "license": "MIT",
+      "engines": {
+        "node": ">=10.5.0"
+      }
+    },
+    "node_modules/node-fetch": {
+      "version": "3.3.2",
+      "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-3.3.2.tgz",
+      "integrity": "sha512-dRB78srN/l6gqWulah9SrxeYnxeddIG30+GOqK/9OlLVyLg3HPnr6SqOWTWOXKRwC2eGYCkZ59NNuSgvSrpgOA==",
+      "dev": true,
+      "license": "MIT",
+      "dependencies": {
+        "data-uri-to-buffer": "^4.0.0",
+        "fetch-blob": "^3.1.4",
+        "formdata-polyfill": "^4.0.10"
+      },
+      "engines": {
+        "node": "^12.20.0 || ^14.13.1 || >=16.0.0"
+      },
+      "funding": {
+        "type": "opencollective",
+        "url": "https://opencollective.com/node-fetch"
+      }
+    },
     "node_modules/node-fetch-native": {
       "version": "1.6.7",
       "resolved": "https://registry.npmjs.org/node-fetch-native/-/node-fetch-native-1.6.7.tgz",
       "dev": true,
       "license": "MIT"
     },
+    "node_modules/node-html-parser": {
+      "version": "6.1.13",
+      "resolved": "https://registry.npmjs.org/node-html-parser/-/node-html-parser-6.1.13.tgz",
+      "integrity": "sha512-qIsTMOY4C/dAa5Q5vsobRpOOvPfC4pB61UVW2uSwZNUp0QU/jCekTal1vMmbO0DgdHeLUJpv/ARmDqErVxA3Sg==",
+      "dev": true,
+      "license": "MIT",
+      "dependencies": {
+        "css-select": "^5.1.0",
+        "he": "1.2.0"
+      }
+    },
     "node_modules/node-mock-http": {
       "version": "1.0.4",
       "resolved": "https://registry.npmjs.org/node-mock-http/-/node-mock-http-1.0.4.tgz",
         "url": "https://github.com/sponsors/wooorm"
       }
     },
+    "node_modules/web-streams-polyfill": {
+      "version": "3.3.3",
+      "resolved": "https://registry.npmjs.org/web-streams-polyfill/-/web-streams-polyfill-3.3.3.tgz",
+      "integrity": "sha512-d2JWLCivmZYTSIoge9MsgFCZrt571BikcWGYkjC1khllbTeDlGqZ2D8vD8E/lJa8WGWbb7Plm8/XJYV7IJHZZw==",
+      "dev": true,
+      "license": "MIT",
+      "engines": {
+        "node": ">= 8"
+      }
+    },
     "node_modules/which": {
       "version": "2.0.2",
       "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz",
index bcb1459a89bec93e0808200c5bfb2bdb231e9f60..7bcb0c57239eb1dbd0932679eed1dfb7915881d9 100644 (file)
     "@types/prismjs": "^1.26.5",
     "astro": "^5.16.6",
     "astro-auto-import": "^0.4.5",
+    "astro-broken-links-checker": "^1.0.6",
     "autoprefixer": "^10.4.23",
     "bootstrap-vscode-theme": "^0.0.9",
     "bundlewatch": "^0.4.1",
-    "lightningcss": "^1.30.2",
     "clipboard": "^2.0.11",
     "cross-env": "^10.1.0",
     "eslint": "8.57.1",
     "karma-jasmine": "^5.1.0",
     "karma-jasmine-html-reporter": "^2.1.0",
     "karma-rollup-preprocessor": "7.0.7",
+    "lightningcss": "^1.30.2",
     "lockfile-lint": "^4.14.1",
     "markdownlint-cli": "^0.45.0",
     "mime": "^4.1.0",
index b4199fe7edd2aad21813c581c1a2ab2810045612..6928f69d7edf5eba63e877b6ea4ba7c34f6043df 100644 (file)
@@ -1,4 +1,5 @@
 import { defineConfig } from 'astro/config'
+import astroBrokenLinksChecker from 'astro-broken-links-checker'
 import bootstrapLight from 'bootstrap-vscode-theme/themes/bootstrap-light.json'
 import bootstrapDark from 'bootstrap-vscode-theme/themes/bootstrap-dark.json'
 import { transformerNotationDiff, transformerNotationHighlight } from '@shikijs/transformers'
@@ -24,7 +25,15 @@ export default defineConfig({
   build: {
     assets: `docs/${getConfig().docs_version}/assets`
   },
-  integrations: [bootstrap()],
+  integrations: [
+    bootstrap(),
+    astroBrokenLinksChecker({
+      checkExternalLinks: false,
+      cacheExternalLinks: false,
+      throwError: true,
+      linkCheckerDir: '.link-checker'
+    })
+  ],
   markdown: {
     smartypants: false,
     syntaxHighlight: 'shiki',
index bee8e690fcbe73fb806101533fccae811be68865..3077d3a36c201104f5bc20bda92ed7802e4be1dc 100644 (file)
   description: Expand and collapse areas of content, or create accordions.
   link: components/collapse/
 
+- name: Dialog
+  description: Add flexible and responsive dialogs to your project.
+  link: components/dialog/
+
 - name: Dropdown
   description: Create menus of links, actions, forms, and more.
   link: components/dropdowns/
 
-- name: Modal
-  description: Add flexible and responsive dialogs to your project.
-  link: components/modal/
-
 - name: Offcanvas
   description: Build and toggle hidden sidebars into any page.
   link: components/offcanvas/
index bb80e8d6be0ec8ac27021b933c2df01a87909cca..04177cb3818f5846639650751712b5a7923cf6b8 100644 (file)
@@ -304,7 +304,7 @@ import Placeholder from "@shortcodes/Placeholder.astro"
     <article class="my-3" id="figures">
       <div class="bd-heading sticky-xl-top align-self-start mt-5 mb-3 mt-xl-0 mb-xl-2">
         <h3>النماذج البيانية</h3>
-        <a class="d-flex align-items-center" hreflang="en" href={getVersionedDocsPath('content/figures')}>دليل الإستخدام</a>
+        <a class="d-flex align-items-center" hreflang="en" href={getVersionedDocsPath('content/images#figures')}>دليل الإستخدام</a>
       </div>
 
       <div>
index 0b091ba283d8c8fd213e7408a6cc916744f86ff7..60c91be15a887f71cdd26a94253f062588453f2b 100644 (file)
@@ -290,7 +290,7 @@ export const body_class = 'bg-body-tertiary'
     <article class="my-3" id="figures">
       <div class="bd-heading sticky-xl-top align-self-start mt-5 mb-3 mt-xl-0 mb-xl-2">
         <h3>Figures</h3>
-        <a class="d-flex align-items-center" href={getVersionedDocsPath('content/figures')}>Documentation</a>
+        <a class="d-flex align-items-center" href={getVersionedDocsPath('content/images#figures')}>Documentation</a>
       </div>
 
       <div>
index 6476650671fee15c48d4550ba7c84ffffcf02bef..ea8b8a4f48af6d83d9eaa70aecc9a1d383f72cad 100644 (file)
@@ -98,10 +98,10 @@ Utility classes are available for most common text-related CSS properties.
 - [Font style]([[docsref:/utilities/font-style]])
 - [Font weight]([[docsref:/utilities/font-weight]])
 - [Line height]([[docsref:/utilities/line-height]])
-- [Text alignment]([[docsref:/utilities/text-alignment])
-- [Text transform]([[docsref:/utilities/text-transform])
-- [Text decoration]([[docsref:/utilities/text-decoration])
-- [Text wrapping]([[docsref:/utilities/text-wrapping])
+- [Text alignment]([[docsref:/utilities/text-alignment]])
+- [Text transform]([[docsref:/utilities/text-transform]])
+- [Text decoration]([[docsref:/utilities/text-decoration]])
+- [Text wrapping]([[docsref:/utilities/text-wrapping]])
 - [Vertical alignment]([[docsref:/utilities/vertical-align]])
 
 Change text alignment, transform, style, weight, line-height, decoration and color with our text and [color utilities]([[docsref:/utilities/colors]]).
index 54d12a29810c9d217dca4cef8e41fb80afddb7fd..11f16ccfdefdc71458ce40221ebbbc7e0b25db80 100644 (file)
@@ -26,7 +26,7 @@ Note that we're using a width utility of `.w-12` to ensure the input is wide eno
 
 ### With icon
 
-Use the [form adorn component](/docs/forms/form-adorn) to add a calendar icon alongside the datepicker input. When the input is inside a `.form-adorn` wrapper, the calendar automatically positions relative to the wrapper instead of the input.
+Use the [form adorn component]([[docsref:/forms/form-adorn]]) to add a calendar icon alongside the datepicker input. When the input is inside a `.form-adorn` wrapper, the calendar automatically positions relative to the wrapper instead of the input.
 
 <Example code={`<label for="datepickerIconStart" class="form-label">Select date</label>
   <div class="form-adorn w-12">
index 4e3bc98249f2eae3d658200a447964c255cc1e1c..dd64ca08b4e443062836b5de1802367c35f9c78e 100644 (file)
@@ -8,7 +8,7 @@ toc: true
 
 The `.form-adorn` wrapper replicates `.form-control` styling (border, background, focus states) while using flexbox to position adornments alongside a "ghost input," a form control that has virtually no visual styling. The `.form-ghost` input inside is transparent and inherits styles from the wrapper.
 
-See the [form control](/docs/forms/form-control) documentation for more information on the `.form-control` and `.form-ghost` classes.
+See the [form control]([[docsref:/forms/form-control]]) documentation for more information on the `.form-control` and `.form-ghost` classes.
 
 ## Example
 
index 60f90a9fd42f60e5c4d047041d9d0e20735a32d5..d62afd9d96b8e7d15447c9111660518b43fea465 100644 (file)
@@ -31,7 +31,7 @@ Wrap your inputs in a container with `.otp` and add `data-bs-otp` to enable the
 
 ## Connected inputs
 
-Add `.input-group` to visually connect the inputs into a single cohesive field, leveraging Bootstrap's [input group](/docs/forms/input-group/) styles. We override the `width` to prevent stretching the inputs.
+Add `.input-group` to visually connect the inputs into a single cohesive field, leveraging Bootstrap's [input group]([[docsref:/forms/input-group]]) styles. We override the `width` to prevent stretching the inputs.
 
 <Example code={`<div class="otp input-group" data-bs-otp>
     <input type="text" class="form-control" aria-label="Digit 1">
index 34a9a1fe7b57f6dee8106a287bdb4416f75045c0..365e0cb62147a94b01a784c218ce00fa52bbd46f 100644 (file)
@@ -6,10 +6,10 @@ aliases: "/docs/[[config:docs_version]]/forms/"
 sections:
   - title: Form control
     description: Style textual inputs and textareas with support for multiple states.
-  - title: Select
-    description: Improve browser default select elements with a custom initial appearance.
-  - title: Checks & radios
-    description: Use our custom radio buttons and checkboxes in forms for selecting input options.
+  - title: Checkbox
+    description: Use our custom checkboxes in forms for selecting input options.
+  - title: Radio
+    description: Use our custom radio buttons in forms for selecting input options.
   - title: Range
     description: Replace browser default range inputs with our custom version.
   - title: Input group
index 7e15e4baa091bbf0a29ae0bd269b93cea3ffc5e1..fa6bed9d4732264dd5f076b262c155fcc9dc86c0 100644 (file)
@@ -130,8 +130,8 @@ You can also do the old fashioned thing and download Bootstrap manually. Choose
 <BsTable>
 | Type | Description | Link |
 | --- | --- | --- |
-| <strong class="text-nowrap">Distribution files</strong> | Ready-to-use compiled and minified CSS and JavaScript files. Doesn't include documentation, source files, or dependencies like Floating UI. | <a href="[[config:download.dist]]" class="btn btn-subtle theme-accent">Download</a> |
-| <strong class="text-nowrap">Source files</strong> | Sass, JavaScript, and documentation files for compiling with your own asset pipeline. Requires [Sass compiler]([[docsref:/guides/contribute#sass]]), [Autoprefixer](https://github.com/postcss/autoprefixer), and a JavaScript bundler like [Rollup](https://rollupjs.org/) or [Webpack](https://webpack.js.org/). | <a href="[[config:download.source]]" class="btn btn-subtle theme-accent">Download</a> |
+| <strong class="text-nowrap">Distribution files</strong> | Ready-to-use compiled and minified CSS and JavaScript files. Doesn't include documentation, source files, or dependencies like Floating UI. | {/*<a href="[[config:download.dist]]" class="btn btn-subtle theme-accent">Download</a>*/} |
+| <strong class="text-nowrap">Source files</strong> | Sass, JavaScript, and documentation files for compiling with your own asset pipeline. Requires [Sass compiler]([[docsref:/guides/contribute#sass]]), [Autoprefixer](https://github.com/postcss/autoprefixer), and a JavaScript bundler like [Rollup](https://rollupjs.org/) or [Webpack](https://webpack.js.org/). | {/*<a href="[[config:download.source]]" class="btn btn-subtle theme-accent">Download</a>*/} |
 </BsTable>
 
 Should you require our full set of [build tools]([[docsref:/guides/contribute#tooling-setup]]), they are included for developing Bootstrap and its docs, but they’re likely unsuitable for your own purposes.
diff --git a/site/static/docs/[version]/assets/img/examples/dialogs.png b/site/static/docs/[version]/assets/img/examples/dialogs.png
new file mode 100644 (file)
index 0000000..a9b6723
Binary files /dev/null and b/site/static/docs/[version]/assets/img/examples/dialogs.png differ
diff --git a/site/static/docs/[version]/assets/img/examples/dialogs@2x.png b/site/static/docs/[version]/assets/img/examples/dialogs@2x.png
new file mode 100644 (file)
index 0000000..013aa33
Binary files /dev/null and b/site/static/docs/[version]/assets/img/examples/dialogs@2x.png differ
diff --git a/site/static/docs/[version]/assets/img/examples/modals.png b/site/static/docs/[version]/assets/img/examples/modals.png
deleted file mode 100644 (file)
index 0c8876a..0000000
Binary files a/site/static/docs/[version]/assets/img/examples/modals.png and /dev/null differ
diff --git a/site/static/docs/[version]/assets/img/examples/modals@2x.png b/site/static/docs/[version]/assets/img/examples/modals@2x.png
deleted file mode 100644 (file)
index 34ab6d6..0000000
Binary files a/site/static/docs/[version]/assets/img/examples/modals@2x.png and /dev/null differ