You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add a parameter to a document that another file utilizes (so for this case an index of writings); then, remove that parameter. The layout fails to recognize that removed parameter.
---
title: 'Kindle Paperwhite is Magic.'date: 'June 01 2013 04:32 AM'description: 'A review of the Kindle Paperwhite'layout: 'writing'tags:
- reading
- books
- e-reader
- e-ink
- paperwhite
- kindle
- amazon
---
Then, remove the description and assume the template no longer utilizes the description.
The template persists in rendering a value that no longer exists; it isn't being removed from the model that the template has. However, when I did a raw query with the DocPad API the property was removed.
The only work around is to manually set the value to false description:false then the value is updated. So it appears that removing the value did not update the model.
Here is the index code:
<% writings = @getFilesAtPath('./writing/', {date: -1}); %><% if writings.length: %><ulclass="items"><% for writing in writings.models: %><li><%- writing.get('title') %><% console.log(writing.get('description')); %><% if writing.get('description'): %><blockquote><pclass="description"><%- writing.get('description'); %></p></blockquote><% end %></li><% end %></ul><% else: %><p>No writing</p><% end %>
This is correct. Unfortunately, I don't have a good idea on how to fix this.
One possible way is to keep a listing of which attributes are meta attributes, then when re-parsing, we delete the old meta attributes if they are their old values still, and no longer exist with the latest parse. But the problem with this is that things like setMetaDefaults on add listeners, won't work.
Happy for someone to send a pull request for this.
Add a parameter to a document that another file utilizes (so for this case an index of writings); then, remove that parameter. The layout fails to recognize that removed parameter.
Then, remove the description and assume the template no longer utilizes the description.
The template persists in rendering a value that no longer exists; it isn't being removed from the model that the template has. However, when I did a raw query with the DocPad API the property was removed.
The only work around is to manually set the value to false
description:false
then the value is updated. So it appears that removing the value did not update the model.Here is the index code:
Want to back this issue? Place a bounty on it! We accept bounties via Bountysource.
The text was updated successfully, but these errors were encountered: