Closed patdavid closed 7 years ago
Try logging out the file so you can see if there's another property you can use to access the pre-rendered content. This is actually expected, as is, because this plugin doesn't render anything. It just generates the pages with the correct metadata and your layouts
function is rendering the page itself. Layouts is rendering the other pages before the pages this plugin has added.
If there's no existing pre-layout content property, you'll need to add your own plugin to move contents
to another property before render and use that in your pagination template.
@blakeembrey ty for the quick response.
I just noticed that subsequent rebuilds exhibit random behavior that seems to jibe with what your saying. Previously I had stored this content as part of the metalsmith-more
plugin and used that to output the paginated content. I think that may be a better path and will hopefully solve this.
Thanks!
I've run into an odd problem here. I've got a very simple project setup, using only (in this order):
The template for paginated files looks like this:
I am expecting that {{{ contents }}} writes only the contents of each post, but it appears to be writing the fully templated version of each post.
In the html output, I expected:
Instead I am seeing what appears to be the fully templated contents (notice the extra
html
elements):