Set jekyll environment production in Github Pages

27 Jan 2018

Put this envrionment_variables.rb

<div class="github">
<script src="https://gist.github.com/ajmalafif/89250b710dc7c3018efdfce12dbae78e.js?file=environment_variables.rb"></script>
</div>

Put this in .travis.yml

```
env:
global:
- JEKYLL_ENV=production
```

Now you can use this in your code in your template

<div class="github">
<script src="https://gist.github.com/ajmalafif/89250b710dc7c3018efdfce12dbae78e.js?file=index.rb"></script>
</div>

← Previous Page