From e22e675e560d61bb7d08c54aded0636813e0a04f Mon Sep 17 00:00:00 2001 From: Alexandra Duval Date: Fri, 12 Jun 2026 16:36:29 +0200 Subject: [PATCH 1/7] feat: added links to github changelog to migration page headers --- .../docs/getting-started/migration.mdx | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/site/src/content/docs/getting-started/migration.mdx b/site/src/content/docs/getting-started/migration.mdx index f4ab1679a3..f63cc67b3b 100644 --- a/site/src/content/docs/getting-started/migration.mdx +++ b/site/src/content/docs/getting-started/migration.mdx @@ -102,7 +102,7 @@ toc: true -## v1.3.0 +## [`v1.3.0`](https://github.com/Orange-OpenSource/Orange-Boosted-Bootstrap/releases/tag/v1.3.0-ouds-web)
@@ -142,7 +142,7 @@ toc: true 1. Change the `@include rfs($font-size-base, --#{$prefix}body-font-size);` into `--#{$prefix}body-font-size: #{$font-size-base};`. -## v1.2.0 +## [`v1.2.0`](https://github.com/Orange-OpenSource/Orange-Boosted-Bootstrap/releases/tag/v1.2.0-ouds-web)
@@ -189,7 +189,7 @@ toc: true 2. Remove `@import "boosted/scss/nav";`, `@import "boosted/scss/navbar";`, `@import "boosted/scss/footer";`, and `@import "boosted/scss/orange-navbar";` from the Boosted custom import stack. 3. Change the `@include rfs($font-size-base, --#{$prefix}body-font-size);` into `--#{$prefix}body-font-size: #{$font-size-base};`. -## v1.1.0 +## [`v1.1.0`](https://github.com/Orange-OpenSource/Orange-Boosted-Bootstrap/releases/tag/v1.1.0-ouds-web)
@@ -240,7 +240,7 @@ toc: true 3. Add back `--#{$prefix}highlight-bg` and `--#{$prefix}highlight-color` for light and dark mode and add `--#{$prefix}modal-border-radius: 0px;` for light mode. 4. Remove `@import "boosted/scss/alert";` and `@import "boosted/scss/close";` from the Boosted custom import stack. -## v1.0.0 +## [`v1.0.0`](https://github.com/Orange-OpenSource/Orange-Boosted-Bootstrap/releases/tag/v1.0.0-ouds-web)
@@ -327,7 +327,7 @@ toc: true - Warning Opacity levels values have been changed. Read more in our [opacity page]([[docsref:/utilities/opacity]]). -## v0.6.0 +## [`v0.6.0`](https://github.com/Orange-OpenSource/Orange-Boosted-Bootstrap/releases/tag/v0.6.0-ouds-web)
@@ -421,7 +421,7 @@ toc: true - **5xl** is renamed to `5xlarge` : for example `.m-5xl` → `.m-5xlarge` - **Negative** these changes apply to negative spacings as well, for example `.m-n3xs` → `.m-n3xsmall` -## v0.5.0 +## [`v0.5.0`](https://github.com/Orange-OpenSource/Orange-Boosted-Bootstrap/releases/tag/v0.5.0-ouds-web)
@@ -494,7 +494,7 @@ toc: true - Breaking A parameter from the `focus-visible()` mixin has been removed. If you use the `focus-visible()` mixin in your scss files with a `z-index` as a parameter, please adapt your code. -## v0.4.0 +## [`v0.4.0`](https://github.com/Orange-OpenSource/Orange-Boosted-Bootstrap/releases/tag/v0.4.0-ouds-web)
@@ -556,7 +556,7 @@ toc: true -## v0.3.0 +## [`v0.3.0`](https://github.com/Orange-OpenSource/Orange-Boosted-Bootstrap/releases/tag/v0.3.0-ouds-web)
@@ -797,7 +797,7 @@ toc: true -## v0.1.0 +## [`v0.1.0`](https://github.com/Orange-OpenSource/Orange-Boosted-Bootstrap/releases/tag/v0.1.0-ouds-web)
@@ -2418,7 +2418,7 @@ toc: true - New `color-mode({mode}, {root}, {inverted-mode})` mixin. -## v0.0.3 +## [`v0.0.3`](https://github.com/Orange-OpenSource/Orange-Boosted-Bootstrap/releases/tag/v0.3.0-ouds-web)
@@ -2486,7 +2486,7 @@ From now on, by default, OUDS Web won’t embed Bootstrap elements (like helpers -## v0.0.1 +## [`v0.0.1`](https://github.com/Orange-OpenSource/Orange-Boosted-Bootstrap/releases/tag/v0.0.1-ouds-web)
From f88685ac1b9642a4bc67c692f15611d1d2161c85 Mon Sep 17 00:00:00 2001 From: Alexandra Duval Date: Fri, 19 Jun 2026 14:10:28 +0200 Subject: [PATCH 2/7] feat: improved version link management --- .../docs/getting-started/migration.mdx | 26 +++++++------- site/src/libs/astro.ts | 4 +-- site/src/libs/remark.ts | 34 ++++++++++++++++--- site/src/libs/toc.ts | 4 +++ site/src/libs/utils.ts | 4 +++ 5 files changed, 53 insertions(+), 19 deletions(-) diff --git a/site/src/content/docs/getting-started/migration.mdx b/site/src/content/docs/getting-started/migration.mdx index f63cc67b3b..a1131ec643 100644 --- a/site/src/content/docs/getting-started/migration.mdx +++ b/site/src/content/docs/getting-started/migration.mdx @@ -17,7 +17,7 @@ toc: true ``` -## v1.4.0 +## v1.4.0 [[version-link]]
@@ -102,7 +102,7 @@ toc: true -## [`v1.3.0`](https://github.com/Orange-OpenSource/Orange-Boosted-Bootstrap/releases/tag/v1.3.0-ouds-web) +## v1.3.0 [[version-link]]
@@ -142,7 +142,7 @@ toc: true 1. Change the `@include rfs($font-size-base, --#{$prefix}body-font-size);` into `--#{$prefix}body-font-size: #{$font-size-base};`. -## [`v1.2.0`](https://github.com/Orange-OpenSource/Orange-Boosted-Bootstrap/releases/tag/v1.2.0-ouds-web) +## v1.2.0 [[version-link]]
@@ -189,7 +189,7 @@ toc: true 2. Remove `@import "boosted/scss/nav";`, `@import "boosted/scss/navbar";`, `@import "boosted/scss/footer";`, and `@import "boosted/scss/orange-navbar";` from the Boosted custom import stack. 3. Change the `@include rfs($font-size-base, --#{$prefix}body-font-size);` into `--#{$prefix}body-font-size: #{$font-size-base};`. -## [`v1.1.0`](https://github.com/Orange-OpenSource/Orange-Boosted-Bootstrap/releases/tag/v1.1.0-ouds-web) +## v1.1.0 [[version-link]]
@@ -240,7 +240,7 @@ toc: true 3. Add back `--#{$prefix}highlight-bg` and `--#{$prefix}highlight-color` for light and dark mode and add `--#{$prefix}modal-border-radius: 0px;` for light mode. 4. Remove `@import "boosted/scss/alert";` and `@import "boosted/scss/close";` from the Boosted custom import stack. -## [`v1.0.0`](https://github.com/Orange-OpenSource/Orange-Boosted-Bootstrap/releases/tag/v1.0.0-ouds-web) +## v1.0.0 [[version-link]]
@@ -327,7 +327,7 @@ toc: true - Warning Opacity levels values have been changed. Read more in our [opacity page]([[docsref:/utilities/opacity]]). -## [`v0.6.0`](https://github.com/Orange-OpenSource/Orange-Boosted-Bootstrap/releases/tag/v0.6.0-ouds-web) +## v0.6.0 [[version-link]]
@@ -421,7 +421,7 @@ toc: true - **5xl** is renamed to `5xlarge` : for example `.m-5xl` → `.m-5xlarge` - **Negative** these changes apply to negative spacings as well, for example `.m-n3xs` → `.m-n3xsmall` -## [`v0.5.0`](https://github.com/Orange-OpenSource/Orange-Boosted-Bootstrap/releases/tag/v0.5.0-ouds-web) +## v0.5.0 [[version-link]]
@@ -494,7 +494,7 @@ toc: true - Breaking A parameter from the `focus-visible()` mixin has been removed. If you use the `focus-visible()` mixin in your scss files with a `z-index` as a parameter, please adapt your code. -## [`v0.4.0`](https://github.com/Orange-OpenSource/Orange-Boosted-Bootstrap/releases/tag/v0.4.0-ouds-web) +## v0.4.0 [[version-link]]
@@ -556,7 +556,7 @@ toc: true -## [`v0.3.0`](https://github.com/Orange-OpenSource/Orange-Boosted-Bootstrap/releases/tag/v0.3.0-ouds-web) +## v0.3.0 [[version-link]]
@@ -639,7 +639,7 @@ toc: true -## v0.2.0 +## v0.2.0 [[version-link]]
@@ -797,7 +797,7 @@ toc: true -## [`v0.1.0`](https://github.com/Orange-OpenSource/Orange-Boosted-Bootstrap/releases/tag/v0.1.0-ouds-web) +## v0.1.0 [[version-link]]
@@ -2418,7 +2418,7 @@ toc: true - New `color-mode({mode}, {root}, {inverted-mode})` mixin. -## [`v0.0.3`](https://github.com/Orange-OpenSource/Orange-Boosted-Bootstrap/releases/tag/v0.3.0-ouds-web) +## v0.0.3 [[version-link]]
@@ -2486,7 +2486,7 @@ From now on, by default, OUDS Web won’t embed Bootstrap elements (like helpers -## [`v0.0.1`](https://github.com/Orange-OpenSource/Orange-Boosted-Bootstrap/releases/tag/v0.0.1-ouds-web) +## v0.0.1 [[version-link]]
diff --git a/site/src/libs/astro.ts b/site/src/libs/astro.ts index 5a3ea9cc2c..e1f7736d32 100644 --- a/site/src/libs/astro.ts +++ b/site/src/libs/astro.ts @@ -9,7 +9,7 @@ import type { Element, Text } from 'hast' import rehypeAutolinkHeadings from 'rehype-autolink-headings' import { getConfig } from './config' import { rehypeBsTable } from './rehype' -import { remarkBsComp, remarkBsConfig, remarkBsDocsref } from './remark' +import { remarkBsComp, remarkBsConfig, remarkBsDocsref, remarkBsVersionLink } from './remark' import { configurePrism } from './prism' import { docsDirectory, @@ -83,7 +83,7 @@ export function oudsWeb(): AstroIntegration[] { ], rehypeBsTable ], - remarkPlugins: [remarkBsConfig, remarkBsDocsref, remarkBsComp] + remarkPlugins: [remarkBsConfig, remarkBsDocsref, remarkBsComp, remarkBsVersionLink] } }) }, diff --git a/site/src/libs/remark.ts b/site/src/libs/remark.ts index 8cc082422a..67a5bde79e 100644 --- a/site/src/libs/remark.ts +++ b/site/src/libs/remark.ts @@ -4,7 +4,7 @@ import type { Plugin } from 'unified' import { visit } from 'unist-util-visit' import { getConfig } from './config' import { getVersionedDocsPath } from './path' -import { getComponentSVG } from './utils' +import { getComponentSVG, getVersionLink } from './utils' // [[config:foo]] // [[config:foo.bar]] @@ -14,6 +14,8 @@ const configRegExp = /\[\[config:(?[\w\.]+)]]/g const docsrefRegExp = /\[\[docsref:(?[\w\.\/#-]+)]]/g // [[comp]] const compRegExp = /\[\[comp\]\]\s*/ +// [[version-link]] +const versionLinkRegExp = /\[\[version-link\]\]\s*/ // A remark plugin to replace config values embedded in markdown (or MDX) files. // For example, [[config:foo]] will be replaced with the value of the `foo` key in the `config.yml` file. @@ -102,7 +104,7 @@ export const remarkBsComp: Plugin<[], Root> = function () { type: 'html', value: getComponentSVG('hl-small-icon me-scaled-2xsmall mb-xsmall') }, ...parent.children] - node.value = replaceCompInText(node.value) + node.value = replaceRegexInText(node.value, compRegExp) } break } @@ -111,8 +113,32 @@ export const remarkBsComp: Plugin<[], Root> = function () { } } -function replaceCompInText(text: string) { - return text.replace(compRegExp, (_match, path) => { +// A remark plugin to add a link to changelog to version titles. +export const remarkBsVersionLink: Plugin<[], Root> = function () { + return function remarkBsVersionLinkPlugin(ast) { + // https://github.com/syntax-tree/mdast#nodes + // https://github.com/syntax-tree/mdast-util-mdx-jsx#nodes + visit(ast, ['text'], (node, index, parent) => { + switch (node.type) { + case 'text': { + const regexMatch = node.value.match(versionLinkRegExp) + if (regexMatch) { + const version = node.value.replace(' ' + regexMatch[0], '') + parent.children = [...parent.children, { + type: 'html', + value: getVersionLink(version) + }] + node.value = replaceRegexInText(node.value, versionLinkRegExp) + } + break + } + } + }) + } +} + +function replaceRegexInText(text: string, regex: RegExp) { + return text.replace(regex, (_match, path) => { return `` }) } diff --git a/site/src/libs/toc.ts b/site/src/libs/toc.ts index 4e840389a3..482a6caa9d 100644 --- a/site/src/libs/toc.ts +++ b/site/src/libs/toc.ts @@ -11,6 +11,10 @@ export function generateToc(allHeadings: MarkdownHeading[], types?: string[]) { const toc: TocEntry[] = [] for (const heading of headings) { + if (heading.text.includes('Full changelog')) { + heading.text = heading.text.replace(' Full changelog', '') + } + if (toc.length === 0) { toc.push({ ...heading, children: [] }) continue diff --git a/site/src/libs/utils.ts b/site/src/libs/utils.ts index 6cb7113385..120f404d96 100644 --- a/site/src/libs/utils.ts +++ b/site/src/libs/utils.ts @@ -47,3 +47,7 @@ export function processMarkdownToHtml(markdown: string): string { export function getComponentSVG(className: string): string { return `` } + +export function getVersionLink(version: string): string { + return `Full changelog` +} From 889a8269502f26f3116528484e5cf5a3da293c69 Mon Sep 17 00:00:00 2001 From: Alexandra Duval Date: Fri, 19 Jun 2026 15:56:36 +0200 Subject: [PATCH 3/7] feat: header links ordering --- site/src/libs/astro.ts | 6 ++++-- site/src/libs/rehype.ts | 25 +++++++++++++++++++++++++ site/src/libs/utils.ts | 6 ++++++ 3 files changed, 35 insertions(+), 2 deletions(-) diff --git a/site/src/libs/astro.ts b/site/src/libs/astro.ts index e1f7736d32..5416f4f47e 100644 --- a/site/src/libs/astro.ts +++ b/site/src/libs/astro.ts @@ -8,7 +8,7 @@ import autoImport from 'astro-auto-import' import type { Element, Text } from 'hast' import rehypeAutolinkHeadings from 'rehype-autolink-headings' import { getConfig } from './config' -import { rehypeBsTable } from './rehype' +import { rehypeBsTable, rehypeHeaderLinksOrder } from './rehype' import { remarkBsComp, remarkBsConfig, remarkBsDocsref, remarkBsVersionLink } from './remark' import { configurePrism } from './prism' import { @@ -18,6 +18,7 @@ import { getDocsStaticFsPath, validateVersionedDocsPaths } from './path' +import { isHeading } from './utils.ts' // A list of directories in `src/components` that contains components that will be auto imported in all pages for // convenience. @@ -78,9 +79,10 @@ export function oudsWeb(): AstroIntegration[] { class: 'anchor-link', ariaLabel: `Link to this section: ${(element.children[0] as Text).value}` }), - test: (element: Element) => element.tagName.match(headingsRangeRegex) + test: (element: Element) => isHeading(element.tagName) } ], + rehypeHeaderLinksOrder, rehypeBsTable ], remarkPlugins: [remarkBsConfig, remarkBsDocsref, remarkBsComp, remarkBsVersionLink] diff --git a/site/src/libs/rehype.ts b/site/src/libs/rehype.ts index 5b08120ac7..7c2614a39d 100644 --- a/site/src/libs/rehype.ts +++ b/site/src/libs/rehype.ts @@ -1,6 +1,7 @@ import type { Root } from 'hast' import type { Plugin } from 'unified' import { SKIP, visit } from 'unist-util-visit' +import { isHeading } from './utils.ts' // A rehype plugin to apply CSS classes to tables rendered in markdown (or MDX) files when wrapped in a `` // component. @@ -32,3 +33,27 @@ export const rehypeBsTable: Plugin<[], Root> = function () { }) } } + +// A rehype plugin to add link to changelog +export const rehypeHeaderLinksOrder: Plugin<[], Root> = function () { + return function rehypeHeaderLinksOrderPlugin(ast) { + visit(ast, 'element', (node, index, parent) => { + if (!isHeading(node.tagName) || !parent) { + return + } + + const anchorLinkIndex = node.children.findIndex(child => child.type === "element" && child.properties.class?.includes('anchor-link')) + const headingIndex = node.children.findIndex(child => child.type === 'text') + if (anchorLinkIndex === -1 || headingIndex === -1) { + return + } + + const targetIndex = headingIndex + 1 + if (anchorLinkIndex !== targetIndex) { + const [anchorLink] = node.children.splice(anchorLinkIndex, 1) + const insertIndex = anchorLinkIndex < targetIndex ? targetIndex - 1 : targetIndex + node.children.splice(insertIndex, 0, anchorLink) + } + }) + } +} diff --git a/site/src/libs/utils.ts b/site/src/libs/utils.ts index 120f404d96..4cefd0704e 100644 --- a/site/src/libs/utils.ts +++ b/site/src/libs/utils.ts @@ -4,6 +4,7 @@ import toString from 'mdast-util-to-string' import { remark } from 'remark' import remarkHtml from 'remark-html' import { getVersionedDocsPath } from './path' +import { getConfig } from "./config.ts"; export function capitalizeFirstLetter(str: string) { return str.charAt(0).toUpperCase() + str.slice(1) @@ -51,3 +52,8 @@ export function getComponentSVG(className: string): string { export function getVersionLink(version: string): string { return `Full changelog` } + +export function isHeading(tag: string): boolean { + const headingsRangeRegex = new RegExp(`^h[${getConfig().anchors.min}-${getConfig().anchors.max}]$`) + return !!tag.match(headingsRangeRegex) +} From df551b83776571049137ac4ffd6e5269d05e73a6 Mon Sep 17 00:00:00 2001 From: Alexandra Duval Date: Fri, 19 Jun 2026 16:12:06 +0200 Subject: [PATCH 4/7] fix: code cleaning --- site/src/libs/astro.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/site/src/libs/astro.ts b/site/src/libs/astro.ts index 5416f4f47e..e462763eb4 100644 --- a/site/src/libs/astro.ts +++ b/site/src/libs/astro.ts @@ -49,8 +49,6 @@ const sitemapExcludes = [ `/${getConfig().brand}/docs/${getConfig().docs_version}/about` ] -const headingsRangeRegex = new RegExp(`^h[${getConfig().anchors.min}-${getConfig().anchors.max}]$`) - export function oudsWeb(): AstroIntegration[] { const sitemapExcludedUrls = sitemapExcludes.map((url) => `${getConfig().baseURL}${url}/`) From b6bb30fc3adfb5515f76f6e046828ff5b310eb52 Mon Sep 17 00:00:00 2001 From: Alexandra Duval Date: Fri, 19 Jun 2026 16:21:16 +0200 Subject: [PATCH 5/7] fix: ts error on anchor class and code cleaning --- site/src/libs/rehype.ts | 17 +++++++++++++++-- site/src/libs/utils.ts | 2 +- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/site/src/libs/rehype.ts b/site/src/libs/rehype.ts index 7c2614a39d..566312f829 100644 --- a/site/src/libs/rehype.ts +++ b/site/src/libs/rehype.ts @@ -34,7 +34,7 @@ export const rehypeBsTable: Plugin<[], Root> = function () { } } -// A rehype plugin to add link to changelog +// A rehype plugin to reorder header anchor and version links export const rehypeHeaderLinksOrder: Plugin<[], Root> = function () { return function rehypeHeaderLinksOrderPlugin(ast) { visit(ast, 'element', (node, index, parent) => { @@ -42,7 +42,20 @@ export const rehypeHeaderLinksOrder: Plugin<[], Root> = function () { return } - const anchorLinkIndex = node.children.findIndex(child => child.type === "element" && child.properties.class?.includes('anchor-link')) + const hasAnchorClass = (child: any) => { + const childClass = child?.properties?.class + if (typeof childClass === 'string') { + return childClass.includes('anchor-link') + } + + if (Array.isArray(childClass)) { + return childClass.some(item => String(item).includes('anchor-link')) + } + + return false + } + + const anchorLinkIndex = node.children.findIndex(child => child.type === "element" && hasAnchorClass(child)) const headingIndex = node.children.findIndex(child => child.type === 'text') if (anchorLinkIndex === -1 || headingIndex === -1) { return diff --git a/site/src/libs/utils.ts b/site/src/libs/utils.ts index 4cefd0704e..914540d90e 100644 --- a/site/src/libs/utils.ts +++ b/site/src/libs/utils.ts @@ -4,7 +4,7 @@ import toString from 'mdast-util-to-string' import { remark } from 'remark' import remarkHtml from 'remark-html' import { getVersionedDocsPath } from './path' -import { getConfig } from "./config.ts"; +import { getConfig } from './config.ts' export function capitalizeFirstLetter(str: string) { return str.charAt(0).toUpperCase() + str.slice(1) From 3a38f39d4050e48fb62a3f730e1bf30c0491cf00 Mon Sep 17 00:00:00 2001 From: Alexandra Duval Date: Thu, 25 Jun 2026 16:47:39 +0200 Subject: [PATCH 6/7] feat: renamed version-link conf value and updated anchor-link to remove reordering plugin --- .../docs/getting-started/migration.mdx | 26 ++++++------- site/src/libs/astro.ts | 3 +- site/src/libs/rehype.ts | 37 ------------------- site/src/libs/remark.ts | 4 +- 4 files changed, 16 insertions(+), 54 deletions(-) diff --git a/site/src/content/docs/getting-started/migration.mdx b/site/src/content/docs/getting-started/migration.mdx index a1131ec643..ae529b413d 100644 --- a/site/src/content/docs/getting-started/migration.mdx +++ b/site/src/content/docs/getting-started/migration.mdx @@ -17,7 +17,7 @@ toc: true ``` -## v1.4.0 [[version-link]] +## v1.4.0 [[version-changelog-link]]
@@ -102,7 +102,7 @@ toc: true -## v1.3.0 [[version-link]] +## v1.3.0 [[version-changelog-link]]
@@ -142,7 +142,7 @@ toc: true 1. Change the `@include rfs($font-size-base, --#{$prefix}body-font-size);` into `--#{$prefix}body-font-size: #{$font-size-base};`. -## v1.2.0 [[version-link]] +## v1.2.0 [[version-changelog-link]]
@@ -189,7 +189,7 @@ toc: true 2. Remove `@import "boosted/scss/nav";`, `@import "boosted/scss/navbar";`, `@import "boosted/scss/footer";`, and `@import "boosted/scss/orange-navbar";` from the Boosted custom import stack. 3. Change the `@include rfs($font-size-base, --#{$prefix}body-font-size);` into `--#{$prefix}body-font-size: #{$font-size-base};`. -## v1.1.0 [[version-link]] +## v1.1.0 [[version-changelog-link]]
@@ -240,7 +240,7 @@ toc: true 3. Add back `--#{$prefix}highlight-bg` and `--#{$prefix}highlight-color` for light and dark mode and add `--#{$prefix}modal-border-radius: 0px;` for light mode. 4. Remove `@import "boosted/scss/alert";` and `@import "boosted/scss/close";` from the Boosted custom import stack. -## v1.0.0 [[version-link]] +## v1.0.0 [[version-changelog-link]]
@@ -327,7 +327,7 @@ toc: true - Warning Opacity levels values have been changed. Read more in our [opacity page]([[docsref:/utilities/opacity]]). -## v0.6.0 [[version-link]] +## v0.6.0 [[version-changelog-link]]
@@ -421,7 +421,7 @@ toc: true - **5xl** is renamed to `5xlarge` : for example `.m-5xl` → `.m-5xlarge` - **Negative** these changes apply to negative spacings as well, for example `.m-n3xs` → `.m-n3xsmall` -## v0.5.0 [[version-link]] +## v0.5.0 [[version-changelog-link]]
@@ -494,7 +494,7 @@ toc: true - Breaking A parameter from the `focus-visible()` mixin has been removed. If you use the `focus-visible()` mixin in your scss files with a `z-index` as a parameter, please adapt your code. -## v0.4.0 [[version-link]] +## v0.4.0 [[version-changelog-link]]
@@ -556,7 +556,7 @@ toc: true -## v0.3.0 [[version-link]] +## v0.3.0 [[version-changelog-link]]
@@ -639,7 +639,7 @@ toc: true -## v0.2.0 [[version-link]] +## v0.2.0 [[version-changelog-link]]
@@ -797,7 +797,7 @@ toc: true -## v0.1.0 [[version-link]] +## v0.1.0 [[version-changelog-link]]
@@ -2418,7 +2418,7 @@ toc: true - New `color-mode({mode}, {root}, {inverted-mode})` mixin. -## v0.0.3 [[version-link]] +## v0.0.3 [[version-changelog-link]]
@@ -2486,7 +2486,7 @@ From now on, by default, OUDS Web won’t embed Bootstrap elements (like helpers -## v0.0.1 [[version-link]] +## v0.0.1 [[version-changelog-link]]
diff --git a/site/src/libs/astro.ts b/site/src/libs/astro.ts index e462763eb4..d29a52d3be 100644 --- a/site/src/libs/astro.ts +++ b/site/src/libs/astro.ts @@ -71,7 +71,7 @@ export function oudsWeb(): AstroIntegration[] { [ rehypeAutolinkHeadings, { - behavior: 'append', + behavior: 'prepend', content: [{ type: 'text', value: ' '}], properties: (element: Element) => ({ class: 'anchor-link', @@ -80,7 +80,6 @@ export function oudsWeb(): AstroIntegration[] { test: (element: Element) => isHeading(element.tagName) } ], - rehypeHeaderLinksOrder, rehypeBsTable ], remarkPlugins: [remarkBsConfig, remarkBsDocsref, remarkBsComp, remarkBsVersionLink] diff --git a/site/src/libs/rehype.ts b/site/src/libs/rehype.ts index 566312f829..cbd848e5bf 100644 --- a/site/src/libs/rehype.ts +++ b/site/src/libs/rehype.ts @@ -33,40 +33,3 @@ export const rehypeBsTable: Plugin<[], Root> = function () { }) } } - -// A rehype plugin to reorder header anchor and version links -export const rehypeHeaderLinksOrder: Plugin<[], Root> = function () { - return function rehypeHeaderLinksOrderPlugin(ast) { - visit(ast, 'element', (node, index, parent) => { - if (!isHeading(node.tagName) || !parent) { - return - } - - const hasAnchorClass = (child: any) => { - const childClass = child?.properties?.class - if (typeof childClass === 'string') { - return childClass.includes('anchor-link') - } - - if (Array.isArray(childClass)) { - return childClass.some(item => String(item).includes('anchor-link')) - } - - return false - } - - const anchorLinkIndex = node.children.findIndex(child => child.type === "element" && hasAnchorClass(child)) - const headingIndex = node.children.findIndex(child => child.type === 'text') - if (anchorLinkIndex === -1 || headingIndex === -1) { - return - } - - const targetIndex = headingIndex + 1 - if (anchorLinkIndex !== targetIndex) { - const [anchorLink] = node.children.splice(anchorLinkIndex, 1) - const insertIndex = anchorLinkIndex < targetIndex ? targetIndex - 1 : targetIndex - node.children.splice(insertIndex, 0, anchorLink) - } - }) - } -} diff --git a/site/src/libs/remark.ts b/site/src/libs/remark.ts index 67a5bde79e..9aa4545aea 100644 --- a/site/src/libs/remark.ts +++ b/site/src/libs/remark.ts @@ -14,8 +14,8 @@ const configRegExp = /\[\[config:(?[\w\.]+)]]/g const docsrefRegExp = /\[\[docsref:(?[\w\.\/#-]+)]]/g // [[comp]] const compRegExp = /\[\[comp\]\]\s*/ -// [[version-link]] -const versionLinkRegExp = /\[\[version-link\]\]\s*/ +// [[version-changelog-link]] +const versionLinkRegExp = /\[\[version-changelog-link\]\]\s*/ // A remark plugin to replace config values embedded in markdown (or MDX) files. // For example, [[config:foo]] will be replaced with the value of the `foo` key in the `config.yml` file. From fcec38d5ac2ab316d896d8402566a5d116e407a7 Mon Sep 17 00:00:00 2001 From: Alexandra Duval Date: Thu, 25 Jun 2026 16:51:16 +0200 Subject: [PATCH 7/7] feat: added external link icon to version changelog link --- site/src/libs/utils.ts | 7 ++++++- .../docs/[version]/assets/img/ouds-web-sprite.svg | 4 ++++ .../orange/docs/[version]/assets/img/ouds-web-sprite.svg | 4 ++++ .../sosh/docs/[version]/assets/img/ouds-web-sprite.svg | 4 ++++ 4 files changed, 18 insertions(+), 1 deletion(-) diff --git a/site/src/libs/utils.ts b/site/src/libs/utils.ts index 914540d90e..175bd78974 100644 --- a/site/src/libs/utils.ts +++ b/site/src/libs/utils.ts @@ -50,7 +50,12 @@ export function getComponentSVG(className: string): string { } export function getVersionLink(version: string): string { - return `Full changelog` + return ` + Full changelog + + ` } export function isHeading(tag: string): boolean { diff --git a/site/static/orange-compact/docs/[version]/assets/img/ouds-web-sprite.svg b/site/static/orange-compact/docs/[version]/assets/img/ouds-web-sprite.svg index f55ea3bd3a..29ecfcc243 100644 --- a/site/static/orange-compact/docs/[version]/assets/img/ouds-web-sprite.svg +++ b/site/static/orange-compact/docs/[version]/assets/img/ouds-web-sprite.svg @@ -183,4 +183,8 @@ + + + + diff --git a/site/static/orange/docs/[version]/assets/img/ouds-web-sprite.svg b/site/static/orange/docs/[version]/assets/img/ouds-web-sprite.svg index f55ea3bd3a..29ecfcc243 100644 --- a/site/static/orange/docs/[version]/assets/img/ouds-web-sprite.svg +++ b/site/static/orange/docs/[version]/assets/img/ouds-web-sprite.svg @@ -183,4 +183,8 @@ + + + + diff --git a/site/static/sosh/docs/[version]/assets/img/ouds-web-sprite.svg b/site/static/sosh/docs/[version]/assets/img/ouds-web-sprite.svg index bc4618bc99..93a9dc4f38 100644 --- a/site/static/sosh/docs/[version]/assets/img/ouds-web-sprite.svg +++ b/site/static/sosh/docs/[version]/assets/img/ouds-web-sprite.svg @@ -164,4 +164,8 @@ + + + +