Git Product home page Git Product logo

hexo-theme-mengd's Issues

添加 “网站正常运行时间”

代码实现
<script type="text/javascript"> function show_runtime() { window.setTimeout("show_runtime()", 1000); X = new Date("01/20/2021 21:00:00"); Y = new Date(); T = (Y.getTime() - X.getTime()); M = 24 * 60 * 60 * 1000; a = T / M; A = Math.floor(a); b = (a - A) * 24; B = Math.floor(b); c = (b - B) * 60; C = Math.floor((b - B) * 60); D = Math.floor((c - C) * 60); runtime_span.innerHTML = "小站于各种崩坏中续存了: " + A + "天" + B + "小时" + C + "分" + D + "秒" } show_runtime(); </script>
来源: FaDai's Blog

hexo g 报错请指点

FATAL {
err: TypeError: Cannot set property 'path' of undefined
at Hexo. (C:\Users\12613\Desktop\hexo\themes\MengD\scripts\replace_config.js:14:22)
at Hexo.emit (events.js:327:22)
at Hexo._generate (C:\Users\12613\Desktop\hexo\node_modules\hexo\lib\hexo\index.js:452:10)
at C:\Users\12613\Desktop\hexo\node_modules\hexo\lib\hexo\index.js:356:19
at tryCatcher (C:\Users\12613\Desktop\hexo\node_modules\bluebird\js\release\util.js:16:23)
at Promise._settlePromiseFromHandler (C:\Users\12613\Desktop\hexo\node_modules\bluebird\js\release\promise.js:547:31)
at Promise._settlePromise (C:\Users\12613\Desktop\hexo\node_modules\bluebird\js\release\promise.js:604:18)
at Promise._settlePromise0 (C:\Users\12613\Desktop\hexo\node_modules\bluebird\js\release\promise.js:649:10)
at Promise._settlePromises (C:\Users\12613\Desktop\hexo\node_modules\bluebird\js\release\promise.js:729:18)
at Promise._fulfill (C:\Users\12613\Desktop\hexo\node_modules\bluebird\js\release\promise.js:673:18)
at Promise._resolveCallback (C:\Users\12613\Desktop\hexo\node_modules\bluebird\js\release\promise.js:466:57)
at Promise._settlePromiseFromHandler (C:\Users\12613\Desktop\hexo\node_modules\bluebird\js\release\promise.js:559:17)
at Promise._settlePromise (C:\Users\12613\Desktop\hexo\node_modules\bluebird\js\release\promise.js:604:18)
at Promise._settlePromise0 (C:\Users\12613\Desktop\hexo\node_modules\bluebird\js\release\promise.js:649:10)
at Promise._settlePromises (C:\Users\12613\Desktop\hexo\node_modules\bluebird\js\release\promise.js:729:18)
at Promise._fulfill (C:\Users\12613\Desktop\hexo\node_modules\bluebird\js\release\promise.js:673:18)
at PromiseArray._resolve (C:\Users\12613\Desktop\hexo\node_modules\bluebird\js\release\promise_array.js:127:19)
at PromiseArray._promiseFulfilled (C:\Users\12613\Desktop\hexo\node_modules\bluebird\js\release\promise_array.js:145:14)
at Promise._settlePromise (C:\Users\12613\Desktop\hexo\node_modules\bluebird\js\release\promise.js:609:26)
at Promise._settlePromise0 (C:\Users\12613\Desktop\hexo\node_modules\bluebird\js\release\promise.js:649:10)
at Promise._settlePromises (C:\Users\12613\Desktop\hexo\node_modules\bluebird\js\release\promise.js:729:18)
at _drainQueueStep (C:\Users\12613\Desktop\hexo\node_modules\bluebird\js\release\async.js:93:12)
} Something's wrong. Maybe you can find the solution here: %s https://hexo.io/docs/troubleshooting.html

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.