D:\Git DownLoad>hexo init folder INFO Cloning hexo-starter https://github.com/hexojs/hexo-starter.git INFO Install dependencies INFO Start blogging with Hexo!
D:\Git DownLoad>cd folder
D:\Git DownLoad\folder>npm install npm warn deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported npm warn deprecated inflight@1.0.6: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful. npm warn deprecated cuid@2.1.8: Cuid and other k-sortable and non-cryptographic ids (Ulid, ObjectId, KSUID, all UUIDs) are all insecure. Use @paralleldrive/cuid2 instead. npm warn deprecated abab@2.0.6: Use your platform's native atob() and btoa() methods instead npm warn deprecated domexception@4.0.0: Use your platform's native DOMException instead
added 228 packages in 14s
23 packages are looking for funding run `npm fund` for details
将<folder>替换为想要的文件夹名称。
Vscode打开<folder>,项目目录如下:
▶
3. 启动Hexo服务器
在博客目录中,运行以下命令来启动Hexo的本地服务器:
1 2 3
hexo clean # 清除缓存文件,建议写完文章后执行一次 hexo g # 生成 public 文件夹,写完文章执行 hexo s # 启动 hexo 服务