How to use an environment variable in Sapper's template.html?

Viewed 189

I would like to use an environment variable within template.html so that I can change the content in the head for all pages based on where I'm running the app. Is this possible?

1 Answers

I never found a way to put environment variables in template.html, but I passed what I needed through server.js, picked it up in _layout.svelte, and included it in a <svelte:head> element.

Related