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:
@ -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;
|
||||
|
Reference in New Issue
Block a user