Replies: 3 comments
-
|
I don't understand the question. (So apparently I have not faced this problem.) :( What do you mean by "published at least once"? Do you mean if an output file was generated by 11ty? Or if it was uploaded to a website in some manner? If the latter, then no. Sadly for you, I think the answer is still no if you meant the former. But could you explain a bit more what problem you have? |
Beta Was this translation helpful? Give feedback.
-
|
Yeah, I don't think it's possible/easy to know if a post has been published and prevent it from being published again. If your main concern is to avoid [needlessly] regenerating assets, I'd probably just check in the processed assets into source control instead of processing them on each build via filters or shortcodes, etc. Only potential solution I could think about was some overly complex system of keeping some SHA1 (or whatever) hash of assets and then finding ways to store that with each post to tell you if some asset has changed. Something like https://developer.mozilla.org/en-US/docs/Web/Security/Subresource_Integrity. That way if an image changed, you might be able to detect that and throw some build error. But that feels like a lot of work. |
Beta Was this translation helpful? Give feedback.
-
|
Thanks for @pdehaan and @btrem for attempting to answer my poorly formulated question. The issue is really regarding assert regeneration. Therefore having a way to say, hey, if I regenerated this in the past and posted it online, then don't regenerate. I guess my partial answer to this is that I should publish the generated assets into the repo, and ensure that each time I change the filter, none of the past svg's change. Any other ideas that don't expect me to pay attention to these changes are welcome. :) |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
Is there a way to know if a post has been published at least once?
This is to avoid the regeneration of some assets I have as filters. I am worried that if I always regenerate everything, I might regenerate old assets that will change old blog posts and I never notice it.
Has anyone faced this problem?
Beta Was this translation helpful? Give feedback.
All reactions