title: Jekyll remote theme doesn't work locally
body: <h1>Abstract</h1>
  
  <ul>
  <li>I wanted to see a page in the local machine made by Jekyll using <code>gem "jekyll-remote-theme"</code></li>
  <li>So I ran <code>bundle exec jekyll serve</code></li>
  <li>But a blank page came out</li>
  </ul>
  
  <h1>What I want to achieve</h1>
  
  <ul>
  <li>To see a page in the local machine made by Jekyll using <code>gem "jekyll-remote-theme"</code>.</li>
  </ul>
  
  <p>I'm trying to build a blog in GitHub Pages with Jekyll and Minimal Mistakes. Before I push changes, I'd like to check if everything's fine with the pages.</p>
  
  <h1>Environment</h1>
  
  <ul>
  <li>Windows 8.1 64bit</li>
  <li>ruby 2.4.3p205 (2017-12-14 revision 61247) [x64-mingw32]</li>
  <li>Jekyll 3.6.2</li>
  </ul>
  
  <h1>What I did</h1>
  
  <ol>
  <li><code>bundle exec jekyll new . --force</code></li>
  <li>Installed the theme with <a href="https://mmistakes.github.io/minimal-mistakes/docs/quick-start-guide/#github-pages-method" rel="noreferrer">GitHub Pages Method</a></li>
  <li><code>bundle exec jekyll serve</code></li>
  </ol>
  
  <h1>What actually happened</h1>
  
  <p>I had an error related to <code>libcurl.dll</code>. Here is the message on Powershell.</p>
  
  <blockquote>
    <p>Dependency Error: Yikes! It looks like you don't have jekyll-remote-theme or o
    ne of its dependencies installed. In order to use Jekyll as currently configured
    , you'll need to install this gem. The full error message from Ruby is: 'Could n
    ot open library 'libcurl': (illegal characters) . Could not open libr
    ary 'libcurl.dll': (illegal characters) . Could not open library 'lib
    curl.so.4': (illegal characters) . Could not open library 'libcurl.so
    .4.dll': (illegal characters) ' If you run into trouble, you can find
     helpful resources at <a href="https://jekyllrb.com/help/" rel="noreferrer">https://jekyllrb.com/help/</a>!</p>
  </blockquote>
  
  <p>I followed instructions in <a href="https://github.com/benbalter/jekyll-remote-theme/issues/17#issuecomment-354677407" rel="noreferrer">GitHub Pages Dependencies Missing · Issue #17 · benbalter/jekyll-remote-theme</a> and the problem was solved.</p>
  
  <p>Then another error came up with <code>bundle exec jekyll serve</code>. The page locally created is blank. <a href="http://127.0.0.1:4000/" rel="noreferrer">http://127.0.0.1:4000/</a> shows nothing.</p>
  
  <pre><code>PS E:\workspace\mysite\dixhom.github.io&gt; bundle exec jekyll serve
  Configuration file: E:/workspace/mysite/dixhom.github.io/_config.yml
              Source: E:/workspace/mysite/dixhom.github.io
         Destination: E:/workspace/mysite/dixhom.github.io/_site
   Incremental build: disabled. Enable with --incremental
        Generating...
        Remote Theme: Using theme mmistakes/minimal-mistakes
       Build Warning: Layout 'single' requested in _posts/2018-02-06-welcome-to-jekyll.markdown does not exist.
       Build Warning: Layout 'default' requested in 404.html does not exist.
       Build Warning: Layout 'page' requested in about.md.bak does not exist.
       Build Warning: Layout 'home' requested in index.html does not exist.
       Build Warning: Layout 'home' requested in index.md.bak does not exist.
                      done in 5.423 seconds.
   Auto-regeneration: enabled for 'E:/workspace/mysite/dixhom.github.io'
      Server address: http://127.0.0.1:4000/
    Server running... press ctrl-c to stop.
  </code></pre>
  
  <p>It looked like <code>jekyll</code> couldn't read layout files. In addition, the <code>_layouts</code> directory wasn't in the directory where I did <code>bundle exec jekyll new</code>. But by default, <a href="https://stackoverflow.com/questions/38891463/jekyll-default-installation-doesnt-have-layouts-directory/38891696">what's in the <code>_layouts</code> directory is packaged in a theme</a> so it's normal not to see the directory. So I just copied <code>_layouts</code> from <a href="https://github.com/mmistakes/minimal-mistakes" rel="noreferrer">minimal-mistakes GitHub repo</a> to the local directory as a workaround. </p>
  
  <p>Then, another error was raised.</p>
  
  <pre><code>PS E:\workspace\mysite\dixhom.github.io&gt; bundle exec jekyll serve
  Configuration file: E:/workspace/mysite/dixhom.github.io/_config.yml
              Source: E:/workspace/mysite/dixhom.github.io
         Destination: E:/workspace/mysite/dixhom.github.io/_site
   Incremental build: disabled. Enable with --incremental
        Generating...
        Remote Theme: Using theme mmistakes/minimal-mistakes
    Liquid Exception: Could not locate the included file 'sidebar.html' in any of ["E:/workspace/mysite/dixhom.github.io/_
  includes"]. Ensure it exists in one of those directories and, if it is a symlink, does not point outside your site sourc
  e. in /_layouts/single.html
  jekyll 3.6.2 | Error:  Could not locate the included file 'sidebar.html' in any of ["E:/workspace/mysite/dixhom.github.i
  o/_includes"]. Ensure it exists in one of those directories and, if it is a symlink, does not point outside your site so
  urce.
  </code></pre>
  
  <p>I could have just copied <code>_includes</code> the same way but I believe the core of the problem lies in <strong><code>jekyll</code> failing to read necessary files from, for example, a GitHub repo</strong>. </p>
  
  <p>The weird thing is when I push local changes to GitHub, GitHub Pages shows 
  a properly rendered page as shown below. </p>
  
  <p><a href="https://i.stack.imgur.com/9NUD6.png" rel="noreferrer"><img src="https://i.stack.imgur.com/9NUD6.png" alt="enter image description here"></a> </p>
  
  <p>By the way, the repo is <a href="https://github.com/Dixhom/dixhom.github.io/tree/7132905f5515345eb78cd71bdad168a15f906a1c" rel="noreferrer">https://github.com/Dixhom/dixhom.github.io/tree/7132905f5515345eb78cd71bdad168a15f906a1c</a></p>
  
  <p>I suspected <code>jekyll-remote-theme</code> doesn't work on the local environment so I googled "jekyll remote theme serve" which wasn't helpful.</p>
  
  <p>Googling keywords like "remote theme Build Warning: Layout  does not exist." didn't help much.</p>
  
  <ul>
  <li><a href="https://stackoverflow.com/questions/39945114/github-pages-renders-blank-page">jekyll - Github Pages renders blank page - Stack Overflow</a><br>
  Different. Working on the local machine not on the github pages </li>
  <li><a href="https://stackoverflow.com/questions/16500043/jekyll-on-github-doesnt-works-the-same-as-local-jekyll-server">Jekyll on github doesn't works the same as local jekyll server - Stack Overflow</a><br>
  Same.</li>
  <li><a href="http://talk.jekyllrb.com/t/jekyll-works-locally-but-comes-up-blank-on-github-pages/321" rel="noreferrer">Jekyll works locally but comes up blank on github pages - Help - Jekyll Talk</a><br>
  -Same.</li>
  <li><a href="https://github.com/jekyll/jekyll/issues/5192" rel="noreferrer">Blank new blog generated with Jekyll-3.2.1 on Windows · Issue #5192 · jekyll/jekyll</a><br>
  It seemed relevant at first sight, but it is about <strong>Gem based themes</strong>, not remote themes.</li>
  </ul>
  
  <p>How can I solve this problem?</p>