website/docs: Update deps. (#14397)

* website/docs: Update deps.

* website/docs: Port partial monorepo fixes. Fix build warnings.

* website/docs: Update Prettier.

* website/docs: Format. Update deps.

* website/docs: Remove empty entry.
This commit is contained in:
Teffen Ellis
2025-05-05 18:59:49 +02:00
committed by GitHub
parent d048f1ecbd
commit 264f59775c
25 changed files with 2224 additions and 1106 deletions

View File

@ -1,10 +1,9 @@
import "mdast-util-to-hast";
import "mdast-util-directive";
import { h } from "hastscript";
import { Root } from "mdast";
import { visit, SKIP } from "unist-util-visit";
import "mdast-util-directive";
import "mdast-util-to-hast";
import { coerce } from "semver";
import { SKIP, visit } from "unist-util-visit";
/**
* MDAST plugin to transform `ak-version` directives into version badges.
@ -40,19 +39,17 @@ function remarkVersionDirective() {
const yearCutoff = new Date().getFullYear() - 2;
if (parsed.major <= yearCutoff) {
throw new Error(
`Semver version <= ${yearCutoff} is not supported: ${semver}`,
);
throw new Error(`Semver version <= ${yearCutoff} is not supported: ${semver}`);
}
const data = node.data || (node.data = {});
const hast = h("span", {
...node.attributes,
className: "badge badge--version",
title: `Available in authentik ${parsed.format()} and later`,
"className": "badge badge--version",
"title": `Available in authentik ${parsed.format()} and later`,
"aria-description": "Version badge",
role: "img",
"role": "img",
});
data.hName = hast.tagName;