Skip to content

Instantly share code, notes, and snippets.

@paulmsmith
Created October 16, 2012 09:42
Show Gist options
  • Save paulmsmith/3898361 to your computer and use it in GitHub Desktop.
Save paulmsmith/3898361 to your computer and use it in GitHub Desktop.
Jekyll Include with var example
## using the includes and setting the var
{% assign themetitle = 'text text' %}
{% include modules/theme_title.html %}
{% assign themetitle = 'new title text' %}
{% include modules/theme_title.html %}
## contents of theme_title.html
<h1 class="theme-title">{{ themetitle }}</h1>
## output of the includes
<h1 class="theme-title">text text</h1>
<h1 class="theme-title">new title text</h1>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment