Skip to content

Commit

Permalink
KSTAT-183: Add environment variables to Twig (#659)
Browse files Browse the repository at this point in the history
  • Loading branch information
RobLoach authored Jul 10, 2024
1 parent 90d9450 commit 6c0e5af
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/kalastatic.js
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,10 @@ 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;

// Delete all the destination files/directories in each source and assets so we don't get orphans.
await clearDestination(config.destination);
Expand Down

0 comments on commit 6c0e5af

Please sign in to comment.