Initial push of Plunk Next

This commit is contained in:
Dries Augustyns
2025-12-01 10:00:25 +01:00
parent ff1876d580
commit 5b430fba0d
27 changed files with 1625 additions and 1682 deletions
File diff suppressed because one or more lines are too long
-33
View File
@@ -1,33 +0,0 @@
// source.config.ts
import { defineConfig, defineDocs } from "fumadocs-mdx/config";
// lib/remark-replace-env.mjs
import { visit } from "unist-util-visit";
var API_URL = process.env.NEXT_PUBLIC_API_URI || "https://api.useplunk.com";
var DASHBOARD_URL = process.env.NEXT_PUBLIC_DASHBOARD_URI || "https://app.useplunk.com";
function remarkReplaceEnv() {
return (tree) => {
visit(tree, ["code", "inlineCode", "text", "link"], (node) => {
if (node.value && typeof node.value === "string") {
node.value = node.value.replace(/\{\{API_URL\}\}/g, API_URL).replace(/\{\{DASHBOARD_URL\}\}/g, DASHBOARD_URL);
}
if (node.url && typeof node.url === "string") {
node.url = node.url.replace(/\{\{API_URL\}\}/g, API_URL).replace(/\{\{DASHBOARD_URL\}\}/g, DASHBOARD_URL);
}
});
};
}
// source.config.ts
var docs = defineDocs({
dir: "content/docs"
});
var source_config_default = defineConfig({
mdxOptions: {
remarkPlugins: [remarkReplaceEnv]
}
});
export {
source_config_default as default,
docs
};
File diff suppressed because one or more lines are too long