website/docs: Prepare for monorepo. (#14119)

* docusaurus-theme: Fix header alignment, overscroll, vertical padding.

* docusaurus-theme: Lint.

* website/docs: Prepare for monorepo packages.

* website/docs: Clean up dependencies. Tidy table.

* website/docs: Fix issue where Prettier affects example content.

* website/docs: Temp fix for stale packages.
This commit is contained in:
Teffen Ellis
2025-04-24 20:22:56 +02:00
committed by GitHub
parent ae41ccd862
commit 5bdef1c4f6
61 changed files with 5862 additions and 3857 deletions

View File

@ -1,43 +0,0 @@
import "mdast-util-to-hast";
import "mdast-util-directive";
import { h } from "hastscript";
import { Root } from "mdast";
import { visit, SKIP } from "unist-util-visit";
/**
* MDAST plugin to transform `ak-preview` directives into preview badges.
*/
function remarkPreviewDirective() {
return function (tree: Root) {
visit(tree, "textDirective", function (node) {
if (node.name !== "ak-preview") return SKIP;
const data = node.data || (node.data = {});
const hast = h("span", {
...node.attributes,
className: "badge badge--preview",
title: `This feature is in preview and may change in the future.`,
"aria-description": "Preview badge",
role: "img",
});
data.hName = hast.tagName;
data.hProperties = hast.properties;
data.hChildren = [
{
type: "text",
value: "Preview",
},
];
node.children = [];
return SKIP;
});
};
}
export default remarkPreviewDirective;