Skip to content

hexo server error when I change the config #1099

Closed
@breestealth

Description

@breestealth

I change the config file to this one(just for the changed parts):

# Writing
new_post_name: :year:month:day.md # File name of new posts

In this way, when I add a new post, the post file name would be like this "20150310.md"

However, when I run hexo server I will got an error like this:

ERROR Process failed: _posts/20140130.md
ValidationError: `slug` is required!
    at SchemaTypeString.SchemaType.validate (/Users/xxxxx/Documents/blog/node_modules/hexo/node_modules/warehouse/lib/schematype.js:125:12)
    at SchemaTypeString.validate (/Users/xxxxx/Documents/blog/node_modules/hexo/node_modules/warehouse/lib/types/string.js:49:45)
    at Array.<anonymous> (/Users/xxxxx/Documents/blog/node_modules/hexo/node_modules/warehouse/lib/schema.js:198:23)
    at Schema._applySetters (/Users/xxxxx/Documents/blog/node_modules/hexo/node_modules/warehouse/lib/schema.js:369:19)
    at /Users/xxxxx/Documents/blog/node_modules/hexo/node_modules/warehouse/lib/model.js:229:24
    at tryCatcher (/Users/xxxxx/Documents/blog/node_modules/hexo/node_modules/bluebird/js/main/util.js:24:31)
    at Promise._settlePromiseFromHandler (/Users/xxxxx/Documents/blog/node_modules/hexo/node_modules/bluebird/js/main/promise.js:454:31)
    at Promise._settlePromiseAt (/Users/xxxxx/Documents/blog/node_modules/hexo/node_modules/bluebird/js/main/promise.js:530:18)
    at Promise._settlePromiseAtPostResolution (/Users/xxxxx/Documents/blog/node_modules/hexo/node_modules/bluebird/js/main/promise.js:224:10)
    at Async._drainQueue (/Users/xxxxx/Documents/blog/node_modules/hexo/node_modules/bluebird/js/main/async.js:84:12)
    at Async._drainQueues (/Users/xxxxx/Documents/blog/node_modules/hexo/node_modules/bluebird/js/main/async.js:89:10)
    at Immediate.Async.drainQueues [as _onImmediate] (/Users/xxxxx/Documents/blog/node_modules/hexo/node_modules/bluebird/js/main/async.js:14:14)
    at processImmediate [as _immediateCallback] (timers.js:358:17)

I run hexo clean before every other command. So there would be nothing about the cache.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions