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

How can I disable layout for index.ejs? #887

Closed
myst729 opened this Issue Oct 23, 2014 · 4 comments

Comments

4 participants
@myst729
Copy link

myst729 commented Oct 23, 2014

I have layout.ejs for every sub page/post. But my homepage have a very different design, how can I render index.ejs without being wrapped by layout.ejs? In other words, can I disable layout for "root" page?

@asvdw

This comment has been minimized.

Copy link

asvdw commented Sep 15, 2015

I'm looking for the same feature. Any idea ?

@leesei

This comment has been minimized.

Copy link
Member

leesei commented Sep 28, 2015

By "root" do you mean the landing/index page?
If so, refer to #1491, add index.md and remove hexo-generator-index.

@erutan

This comment has been minimized.

Copy link

erutan commented Nov 13, 2015

necro, but it's still open so /shrug

the best way to do this would just be to create a new layout (assuming you want to use hexo functionality), and call that from the front-matter via https://hexo.io/docs/templates.html it

By default, the layout template is used by all other templates. You can specify additional layouts in the front-matter or set it to false to disable it. It’s even possible to build a complex nested structure by including more layout templates in your top layout.

though it seems a little odd that you can disable layout.js or add a layout to it, but not specify a peer layout for it (apparently).

@myst729

This comment has been minimized.

Copy link

myst729 commented Nov 13, 2015

@erutan Yep, that's how I have done 😆

@myst729 myst729 closed this Nov 13, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment