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
Should hexo new cool-blog-post wipe db.json? I had this happen to me. The reason seems to be that the db object exists, but the data is never loaded. The data gets deleted by lib/plugins/filter/before_exit/save_database.js which calls the database's .save()...but the db is empty so db.json gets written with empty fields.
I tested this on a fresh blog by running hexo init a-blog.
hexo server preserves the db.json (and updates it, I haven't checked), I think because the Hexo.prototype.watch gets called.
Should
hexo new cool-blog-post
wipe db.json? I had this happen to me. The reason seems to be that the db object exists, but the data is never loaded. The data gets deleted bylib/plugins/filter/before_exit/save_database.js
which calls the database's.save()
...but the db is empty sodb.json
gets written with empty fields.I tested this on a fresh blog by running
hexo init a-blog
.hexo server
preserves the db.json (and updates it, I haven't checked), I think because theHexo.prototype.watch
gets called.Environment Info
Node version(
node -v
): v8.4.0Hexo and Plugin version(
npm ls --depth 0
):├── hexo@3.4.3
├── hexo-generator-archive@0.1.5
├── hexo-generator-category@0.1.3
├── hexo-generator-index@0.2.1
├── hexo-generator-tag@0.2.0
├── hexo-renderer-ejs@0.3.1
├── hexo-renderer-marked@0.3.0
├── hexo-renderer-stylus@0.3.3
└── hexo-server@0.2.2
For question
So...is this supposed to happen...? If so, why wipe the db?
The text was updated successfully, but these errors were encountered: