1
0
mirror of https://github.com/tabler/tabler.git synced 2025-12-21 17:34:25 +04:00

fix: restore analytics environment variables in appData

This commit is contained in:
codecalm
2025-09-23 23:07:40 +02:00
parent 5da9078f55
commit dbb5e7d2ed
2 changed files with 4 additions and 4 deletions

View File

@@ -37,10 +37,6 @@ export default function (eleventyConfig) {
eleventyConfig.addGlobalData("readme", readFileSync(join("..", "README.md"), "utf-8")); eleventyConfig.addGlobalData("readme", readFileSync(join("..", "README.md"), "utf-8"));
eleventyConfig.addGlobalData("license", readFileSync(join("..", "LICENSE"), "utf-8")); eleventyConfig.addGlobalData("license", readFileSync(join("..", "LICENSE"), "utf-8"));
// PostHog Analytics Environment Variables
eleventyConfig.addGlobalData("posthogApiKey", process.env.NEXT_PUBLIC_POSTHOG_KEY);
eleventyConfig.addGlobalData("posthogHost", process.env.NEXT_PUBLIC_POSTHOG_HOST);
eleventyConfig.addGlobalData("pages", () => { eleventyConfig.addGlobalData("pages", () => {
return sync('pages/**/*.html').filter((file) => { return sync('pages/**/*.html').filter((file) => {
return !file.includes('pages/_') && !file.includes('pages/docs/index.html'); return !file.includes('pages/_') && !file.includes('pages/docs/index.html');

View File

@@ -5,4 +5,8 @@ export function appData(eleventyConfig) {
eleventyConfig.addGlobalData("package", JSON.parse(readFileSync(join("..", "core", "package.json"), "utf-8"))); eleventyConfig.addGlobalData("package", JSON.parse(readFileSync(join("..", "core", "package.json"), "utf-8")));
eleventyConfig.addGlobalData("changelog", readFileSync(join("..", "core", "CHANGELOG.md"), "utf-8")); eleventyConfig.addGlobalData("changelog", readFileSync(join("..", "core", "CHANGELOG.md"), "utf-8"));
eleventyConfig.addGlobalData("libs", JSON.parse(readFileSync(join("..", "core", "libs.json"), "utf-8"))); eleventyConfig.addGlobalData("libs", JSON.parse(readFileSync(join("..", "core", "libs.json"), "utf-8")));
// Analytics Environment Variables
eleventyConfig.addGlobalData("posthogApiKey", process.env.NEXT_PUBLIC_POSTHOG_KEY);
eleventyConfig.addGlobalData("posthogHost", process.env.NEXT_PUBLIC_POSTHOG_HOST);
} }