There are a couple of ways to do this. If you’re hosting your site on GitHub then the best way is to wrap your code or HTML inside:
GitHub creates this environment variable on its servers.
But what if you’re hosting somewhere else or your site is already compiled by the time it’s uploaded to the server? In this situation you can just check for your environment client-side: