From 3de4dca6924f62824389e66e7a50d5c38e380330 Mon Sep 17 00:00:00 2001 From: Rob Loach Date: Tue, 14 May 2024 14:06:26 -0400 Subject: [PATCH 1/2] Add data to Twig --- src/kalastatic.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/kalastatic.js b/src/kalastatic.js index 529a23f..190f2c7 100644 --- a/src/kalastatic.js +++ b/src/kalastatic.js @@ -235,6 +235,9 @@ export const kstat = async (config) => { // Add the base url if set by the environmetn and / otherwise. renderData.base_url = process.env.base_url || ""; + // Add all the environment variables to the `env` object in the render data. + renderData.env = process.env; + // Delete all the destination files/directories in each source and assets so we don't get orphans. await clearDestination(config.destination); From 447d8c747640e366518e714333c05bcf3804551f Mon Sep 17 00:00:00 2001 From: Rob Loach Date: Wed, 10 Jul 2024 15:02:22 -0400 Subject: [PATCH 2/2] KSTAT-183: Deprecated comment --- src/kalastatic.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/kalastatic.js b/src/kalastatic.js index 190f2c7..e35548a 100644 --- a/src/kalastatic.js +++ b/src/kalastatic.js @@ -233,8 +233,8 @@ export const kstat = async (config) => { config.destination = config.destination || 'build'; // Add the base url if set by the environmetn and / otherwise. + // TODO: The `base_url` variable will be deprecated in favor of `env.base_url`. renderData.base_url = process.env.base_url || ""; - // Add all the environment variables to the `env` object in the render data. renderData.env = process.env;