Hexo 常见问题解决方案

anran758 at 
记录 Hexo 升级或使用时遇到的问题和一些解决方案。TypeError: config._d.getTime is not a function 经过排查,本次发生错误是由 hexo-related-popular-posts 引发,在该库源码中使用 moment 初始化 list.date 导致了错误。 list.date 通过打印值可以看到是一个 moment 对象,但这个 moment 对象并不规范或者说可能在某处修改了这个 moment 对象的值。moment 内部初始化有一段逻辑是:1this._d = new Date(config._d != null ? config._d.……