Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build Warning: Layout 'page' requested in ... does not exist #37

Closed
krieger-od opened this issue Nov 10, 2014 · 16 comments
Closed

Build Warning: Layout 'page' requested in ... does not exist #37

krieger-od opened this issue Nov 10, 2014 · 16 comments

Comments

@krieger-od
Copy link

@krieger-od krieger-od commented Nov 10, 2014

Getting such warnings:

 $ jekyll build
Configuration file: /home/krieger/jekyll/jekyll-export/_config.yml
            Source: /home/krieger/jekyll/jekyll-export
       Destination: /home/krieger/jekyll/jekyll-export/_site
      Generating... 
     Build Warning: Layout 'post' requested in _posts/2013-06-24-initial-post.md does not exist.
     Build Warning: Layout 'post' requested in _posts/2013-06-25-whdd-2-0rc2.md does not exist.
     Build Warning: Layout 'post' requested in _posts/2013-06-26-humor-whdd-implemented-in-bash.md does not exist.
     Build Warning: Layout 'post' requested in _posts/2013-06-28-sticky-post.md does not exist.
     Build Warning: Layout 'post' requested in _posts/2013-06-29-whdd-2-0.md does not exist.
     Build Warning: Layout 'post' requested in _posts/2013-07-01-whdd-2-0-1.md does not exist.
     Build Warning: Layout 'post' requested in _posts/2013-07-03-new-demo-whdd-read-test-explained.md does not exist.
     Build Warning: Layout 'post' requested in _posts/2013-08-21-whdd-2-1.md does not exist.
     Build Warning: Layout 'post' requested in _posts/2013-08-29-new-demo-copying-with-skipfail-strategy.md does not exist.
     Build Warning: Layout 'post' requested in _posts/2013-08-29-new-demo-copying-with-skipfail_noreverse-strategy.md does not exist.
     Build Warning: Layout 'post' requested in _posts/2014-08-03-whdd-2-2.md does not exist.
     Build Warning: Layout 'page' requested in get-it/index.md does not exist.
     Build Warning: Layout 'page' requested in press/index.md does not exist.
     Build Warning: Layout 'page' requested in report-issue/index.md does not exist.
     Build Warning: Layout 'page' requested in contact/index.md does not exist.
     Build Warning: Layout 'page' requested in demo/index.md does not exist.
                    done.
 Auto-regeneration: disabled. Use --watch to enable.

Used git revision 0c60021

@benbalter
Copy link
Owner

@benbalter benbalter commented Dec 6, 2014

If you add a file _layouts/post.html with the layout you'd like to display posts, the content should render properly.

@benbalter benbalter closed this Dec 6, 2014
@alexebube
Copy link

@alexebube alexebube commented Apr 27, 2015

I Upgraded to jekyll 3 and I am getting the following warnings while while generating and I included all the layout files in the _layouts directory.


vagrant@precise64:/vagrant/healthcare.gov$ jekyll build
Configuration file: /vagrant/healthcare.gov/_config.yml
       Deprecation: Auto-regeneration can no longer be set from your configuration file(s). Use the --[no-]watch/-w command-line option instead.
       Deprecation: The 'server' configuration option is no longer accepted. Use the 'jekyll serve' subcommand to serve your site with WEBrick.
            Source: /vagrant/healthcare.gov
       Destination: /vagrant/healthcare.gov/_site
 Incremental build: enabled
      Generating... 
     Build Warning: Layout 'explainer' requested in _posts/explainer/marketplace-deadlines/0001-01-01-2016.md does not exist.
     Build Warning: Layout 'explainer' requested in _posts/explainer/marketplace-deadlines/es/0001-01-01-2016.md does not exist.
     Build Warning: Layout 'explainer' requested in _posts/explainer/reporting-changes/0001-01-001-after-you-report-changes.md does not exist.
     Build Warning: Layout 'explainer' requested in _posts/explainer/reporting-changes/es/0001-01-001-after-you-report-changes.md does not exist.
     Build Warning: Layout 'basic-full-page' requested in _posts/ffm/0001-01-01-alabama-health-insurance-marketplace.md does not exist.
     Build Warning: Layout 'basic-full-page' requested in _posts/ffm/0001-01-01-alaska-health-insurance-marketplace.md does not exist.
     Build Warning: Layout 'basic-full-page' requested in _posts/0001-01-01-alert.md does not exist.
     Build Warning: Layout 'basic-full-page' requested in _posts/es/0001-01-01-alert.md does not exist.
     Build Warning: Layout 'all-topics' requested in _posts/0001-01-01-all-topics.md does not exist.
     Build Warning: Layout 'all-topics' requested in _posts/es/0001-01-01-all-topics.md does not exist.
     Build Warning: Layout 'basic-full-page' requested in _posts/0001-01-01-application-survey.md does not exist.
     Build Warning: Layout 'helpstep' requested in _posts/helpsteps/0001-01-01-applying-for-coverage.md does not exist.
     Build Warning: Layout 'helpstep' requested in _posts/helpsteps/es/0001-01-01-applying-for-coverage.md does not exist.
     Build Warning: Layout 'basic-full-page' requested in _posts/ffm/0001-01-01-arizona-health-insurance-marketplace.md does not exist.
     Build Warning: Layout 'basic-full-page' requested in _posts/ffm/0001-01-01-arkansas-health-insurance-marketplace.md does not exist.
     Build Warning: Layout 'blog-index' requested in _posts/0001-01-01-blog.md does not exist.
     Build Warning: Layout 'blog-index' requested in _posts/es/0001-01-01-blog.md does not exist.
     Build Warning: Layout 'basic-full-page' requested in _posts/0001-01-01-blog-comment-policy.md does not exist.
     Build Warning: Layout 'basic-full-page' requested in _posts/es/0001-01-01-blog-comment-policy.md does not exist.
     Build Warning: Layout 'explainer' requested in _posts/explainer/reporting-changes/0001-01-001-cancel-plan.md does not exist.
     Build Warning: Layout 'explainer' requested in _posts/explainer/reporting-changes/es/0001-01-001-cancel-plan.md does not exist.
     Build Warning: Layout 'explainer' requested in _posts/explainer/medicaid-chip/0001-01-001-cancelling-markeplace-plan.md does not exist.
     Build Warning: Layout 'explainer' requested in _posts/explainer/medicaid-chip/es/0001-01-001-cancelling-markeplace-plan.md does not exist.
     Build Warning: Layout 'language-resource' requested in _posts/es/language-resource/0001-01-01-chinese.md does not exist.
     Build Warning: Layout 'language-resource' requested in _posts/language-resource/0001-01-01-chinese.md does not exist.
     Build Warning: Layout 'connect' requested in _posts/0001-01-01-connect.md does not exist.
     Build Warning: Layout 'connect' requested in _posts/es/0001-01-01-connect.md does not exist.
@cheshire137
Copy link

@cheshire137 cheshire137 commented May 10, 2015

I have this problem as well. I'm using Jekyll 2.5.3.

% ls _layouts
category_index.html default.html page.html post.html tag_index.html

I get warnings like this for every post:

Build Warning: Layout 'post' requested in _posts/2014-08-25-a-few-new-apps.md does not exist.

@edbucks
Copy link

@edbucks edbucks commented Jul 23, 2015

I only get these warnings if I issue the serve command from inside the _posts directory.

@initor
Copy link

@initor initor commented Nov 29, 2015

@edbucks thanks for your reply. It is exactly what I was missing. 😂😂😂

@piratebroadcast
Copy link

@piratebroadcast piratebroadcast commented Jan 4, 2016

I ran into a similar issue and had a simple fix - I neglected to CD into the new jekyll site I generated and got these exact error messages. Make sure you're in the right spot.

@daniel-mejia
Copy link

@daniel-mejia daniel-mejia commented Feb 2, 2016

I ran into this issue after updating to jekyll 3. I deleted the _posts folder, did a git checkout -- < all the files in the list > to put them back. It worked fine after that.

@vonPetrov
Copy link

@vonPetrov vonPetrov commented Sep 4, 2016

When I first started the server, I saw Jekyll's bundled site just fine, but then I stated getting the "layout 'post' does not exist" warnings.

This was baffling me, because I hadn't made any changes, until I saw @edbucks comment. It's exactly like that: starting the server from the project's root works fine, starting it from the _posts folder generates the error.

But now another pressing question arises: WHERE are these layouts (post, page) coming from, since I can't find any post.html or page.html files, nor any layouts folder?

@benbalter
Copy link
Owner

@benbalter benbalter commented Sep 6, 2016

To clarify, if you get a "layout X does not exist" warning, you need to create a file called _layouts/X.html in the resulting export, to tell Jekyll what layout to use to render that file.

@vonPetrov
Copy link

@vonPetrov vonPetrov commented Sep 6, 2016

Yeah, but the pages that come with the bundler install render just fine when you start the server from the root. Have you found out where they are getting that 'default' layout from, if there is no _layouts folder?

@vonPetrov
Copy link

@vonPetrov vonPetrov commented Sep 6, 2016

I guess the layouts being used in the bundled install are coming directly from the (default) Minima theme...
And I'm also guessing that you didn't need to "find out" about that, @benbalter... ;)

Still, if you could share if/how one can access/modify those files, I'd appreciate it.

@phuc2401
Copy link

@phuc2401 phuc2401 commented Jul 11, 2017

You should see your folder name. layout or layouts

@tartley
Copy link

@tartley tartley commented Apr 15, 2018

I get these errors when switching from the default theme (minima) to a bundle-installed one in my Gemfile (jekyll-theme-cayman).

My _layouts folder never existed. Creating an empty one doesn't help.

I guess that the layouts for minima were being discovered by Jekyll wherever the gem "minima" was installed to, and for some reason it isn't doing the same magic to find the _layouts defined by my "jekyll-theme-cayman" gem.

@tartley
Copy link

@tartley tartley commented Apr 15, 2018

Ah. So:

$ ls $(bundle show minima)/_layouts/
default.html  home.html  page.html  post.html

$ ls $(bundle show jekyll-theme-cayman)/_layouts/
default.html

I have no idea what to do about this.

@tartley
Copy link

@tartley tartley commented Apr 15, 2018

Ah. Cayman is not a theme suitable for blogs. Got it now. Sorry for the noise.

@malachid
Copy link

@malachid malachid commented Jan 8, 2019

I started coming across this error today on my own layouts and thought I would share in case it helps anyone.

I was trying to reference a layout: vendor. I have a _layouts/vendor.html in place, but kept getting the error the OP mentioned.

Running bundle exec jekyll build -V I could see:

      Generating... 
       EntryFilter: excluded /vendor.html

Looking in my _config.yml I noticed that it had:

exclude:
  - vendor

I commented out - vendor and did a clean build. Everything is working now.

That exclusion was at the recommendation of the original theme I installed (along with some others).

Anyways, hope that helps someone.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
You can’t perform that action at this time.