title: How to get Liquid template partials (includes) working with Sinatra?
body: <p>I am new to ruby and I am trying to get template partials working in my Sinatra + Liquid project.</p>
  
  <p>I have several template partials in my /includes directory.</p>
  
  <p>How can I get all of these templates working as liquid partials so I can use them with liquid include tag?</p>
  
  <p>What I actually have done: </p>
  
  <pre><code># Sinatra First App
  require 'sinatra'
  require 'sinatra/config_file'
  require 'liquid'
  
  config_file 'config.yml'
  
  # WebRick
  set :run, true
  set :server, %w[webrick]
  
  # App Paths
  set :root, File.dirname(__FILE__)
  set :views, File.dirname(__FILE__) + '/views'
  set :controlers, File.dirname(__FILE__) + '/controlers'
  set :public_folder, Proc.new { File.join(root, "static") }
  
  # Includes Folder
  includes = File.dirname(__FILE__) + '/includes'
  
  get '/' do
      Liquid::Template.file_system = Liquid::LocalFileSystem.new(includes)
      Liquid::Template.parse(includes).render
      liquid :index, :locals =&gt; { :title =&gt; "My Sinatra App"}
  end
  
  get '/test' do
      "This is the test page."
  end
  </code></pre>
  
  <p>But I am still getting: <strong>Liquid error: Illegal template name ''</strong>.</p>
  
  <p>Here is my index template:</p>
  
  <pre><code>&lt;html&gt;
      {% include 'header' %}
      &lt;body&gt;
          &lt;h1&gt;{{ title }}&lt;/h1&gt;
  
          {{content}}
      &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>and here is the header part template:</p>
  
  <pre><code>&lt;head&gt;
      &lt;title&gt;{{ title }}&lt;/title&gt;
  &lt;/head&gt;
  </code></pre>
  
  <p>How can I fix it? Thanks for every response.</p>