添加站点运行时间
写在前面给站点添加运行时间其实并不复杂,其中只涉及到一个文件和一串代码的修改和安置,步骤如下: 具体步骤找到博客文件的 footer.pug 并加上以下内容 span#runtime script. function updateRuntime() { var start = new Date("2025-05-03T00:00:00"); // ← 替换为你的网站启动时间 var now = new Date(); var diff = now - start; var days = Math.floor(diff / (1000 * 60 * 60 * 24)); var hours = Math.floor((diff / (1000 * 60 * 60)) % 24); var minutes = Math.floor((diff / (1000 * 60)) % 60); var seconds = Math.floor((diff / 1000) % 60); ...
Hello World
Welcome to Hexo! This is your very first post. Check documentation for more info. If you get any problems when using Hexo, you can find the answer in troubleshooting or you can ask me on GitHub. Quick StartCreate a new post1$ hexo new "My New Post" More info: Writing Run server1$ hexo server More info: Server Generate static files1$ hexo generate More info: Generating Deploy to remote sites1$ hexo deploy More info: Deployment