-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Generate draft assets in draft mode #4563
Conversation
The failing jobs do not seem to be related to my changes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
839c7e8
to
b286dbd
Compare
I've rebased my branch onto the latest master. But now I can't see any GitHub actions being executed anymore. |
I also don't understand why 😂 |
b286dbd
to
07b3344
Compare
1c77a68
to
006abfa
Compare
I'm happy if someone wants to take over the 0.05% drop in test coverage. |
Since hexojs#3489, no draft assets are generated. This is the desired behavior when not rendering draft posts. But when working on drafts, the according assets are never rendered. This change checks if draft posts should be rendered, and if this is the case, the assets will not be deleted. I validated this fix by - Running `hexo clean && rm -rf public/ && hexo generate` - Draft assets are not generated (as before) - Running `hexo clean && rm -rf public/ && hexo generate --draft` - Draft assets are generated - Running `hexo server --draft` - Draft assets are generated - Adjusting the existing unit test Fixes: hexojs#4556
006abfa
to
27c098e
Compare
I am surprised this fix is not included in 5.4.0. Can anyone please add this fix to the new version? |
What does it do?
Since #3489, no draft assets are generated. This is the desired behavior when not rendering draft posts. But when working on drafts, the according assets are never rendered. This change checks if draft posts should be rendered, and if this is the case, the assets will not be deleted.
How to test
I validated this fix by
hexo clean && rm -rf public/ && hexo generate
- Draft assets are not generated (as before)hexo clean && rm -rf public/ && hexo generate --draft
- Draft assets are generatedhexo server --draft
- Draft assets are generatedFixes: #4556
Pull request tasks