Skip to content

Instantly share code, notes, and snippets.

@teammixture
Created June 30, 2014 10:23
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save teammixture/fc0d0006c5d62034f6eb to your computer and use it in GitHub Desktop.
Save teammixture/fc0d0006c5d62034f6eb to your computer and use it in GitHub Desktop.
Setting a global variable block at the top of the page, allows any page to inject variables that are available globally...
<!doctype html>
{% block _vars %}{% endblock %}
<html lang="en">
<head>
<title>title</title>
</head>
<body class="{{ _bodyClass }}">
{% block content %}{% endblock %}
</body>
</html>
{% block _vars %}
{% assign _bodyClass = "my-class" %}
{% endblock %}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment