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
now after the date is passed I run npx hexo generate
npx hexo generate
INFO Config based on 2 files
INFO Validating config
INFO Start processing
INFO Files loaded in 428 ms
INFO Generated: archives/page/1/index.html
INFO Generated: index.html
INFO Generated: /test-post/index.html
it is generating the post but not the categories nor the tags. If then I change something so that the hash is different and I re-run then
npx hexo generate
INFO Config based on 2 files
INFO Validating config
INFO Start processing
INFO Files loaded in 412 ms
INFO Generated: categories/index.html
INFO Generated: archives/page/1/index.html
INFO Generated: /test-post/index.html
INFO Generated: tags/index.html
INFO Generated: index.html
INFO Generated: tags/css/page/1/index.html
INFO Generated: categories/web/page/1/index.html
INFO Generated: tags/javascript/page/1/index.html
I need to modify the hash after the post date is passed to have tags and categories generated
Actual behavior
The first time I run npx hexo generate for a post created in the past tags and categories are not generated.
How to reproduce?
1.future: false
2. create a post with a future date
3. after the date is passed run npx hexo generate categoties and tags are not created
4. modify something in the post
5. run npx hexo generate categoties and tags are created
I did some investigation, and I noticed that even future post are all added to db.json (is this expected?). checking the code, for future posts categories and tags are reset to ([]), and when the date is getting in the past, the file is never regenerated (so tags and categories are empty).
I try to make a fix external (could not find a way to patch the code) and created a script which is setting for all future post in db.json the hash and the modified to 0.
In this way, when the date is passed, the post is considered updated and it correctly generates it with tags and categories.
I would see as options to fix this bug either:
do not add future posts to db.json
set hash and modified to 0 after the generate process in db.json for future posts, so when the date is passed the post is considered updated and it is regenerated with tags and categories
Check List
hexo version
to check)Expected behavior
I create a post for a future date in the past a few weeks ago
future: false
now after the date is passed I run
npx hexo generate
it is generating the post but not the categories nor the tags. If then I change something so that the hash is different and I re-run then
I need to modify the hash after the post date is passed to have tags and categories generated
Actual behavior
The first time I run
npx hexo generate
for a post created in the past tags and categories are not generated.How to reproduce?
1.
future: false
2. create a post with a future date
3. after the date is passed run
npx hexo generate
categoties and tags are not created4. modify something in the post
5. run
npx hexo generate
categoties and tags are createdIs the problem still there under
Safe mode
?yes
Your Node.js & npm version
Your Hexo and Plugin version
Your
package.json
Your site's
_config.yml
(Optional)Others
No response
The text was updated successfully, but these errors were encountered: