-
-
Notifications
You must be signed in to change notification settings - Fork 481
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
override block in post using nunjucks #1632
Comments
Sounds like a use case for |
Sorry, of course I messed up my initial question. I edited it to make it clear what I'm hoping to achieve. @Ryuno-Ki So it sounds like I can't override a block in a a post as I demonstrated in the edited initial post. Instead, I'd need to create a new layout, say,
and then in my-post.njk (or my-post.md or whatever):
|
@pdehaan Thanks for the link to the github thread. It confirms what I thought -- and provides some interesting reading -- which is not a big deal. I can create a layout that extends my base layout. |
If I have a block defined in a layout using nunjucks, can I override it in a post? If this is my layout:
In mypost.njk, can I do this?
So in other words change the
main
element on a one off basis. That gives me duplicate<main>
tags, which means either it can't be done or I'm doing it wrong.The text was updated successfully, but these errors were encountered: