Skip to content

Commit

Permalink
fix: disable context output
Browse files Browse the repository at this point in the history
  • Loading branch information
bolt-bot committed Jun 12, 2018
1 parent e020242 commit 8154a48
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions apps/bolt-site/templates/site.twig
Expand Up @@ -194,15 +194,15 @@

{# Shows Twig Vars in Browser Console #}
{% if not bolt.data.config.prod %}
<script type="application/json">{{ _context|json_encode()|raw }}</script>
{# <script type="application/json">{{ _context|json_encode()|raw }}</script>
<script>
(function () {
var me = document.currentScript;
var jsonScriptTag = me.previousElementSibling.innerHTML;
var data = JSON.parse(jsonScriptTag);
console.log('Twig vars for this page: ', data);
})();
</script>
</script>#}
{% endif %}
</body>
</html>

0 comments on commit 8154a48

Please sign in to comment.