################################################ # 以管理员身份初始化Hexo sh-3.2# sudo hexo init INFO Cloning hexo-starter https://github.com/hexojs/hexo-starter.git INFO Install dependencies added 190 packages from 160 contributors and audited 196 packages in 6.046s
15 packages are looking for funding run `npm fund` for details
found 0 vulnerabilities
INFO Start blogging with Hexo!
################################################ # 查看生成的目录结构 sh-3.2# ls -l total 144 drwxr-xr-x 3 root staff 96 May 2 16:27 .github -rw-r--r-- 1 root staff 65 May 2 16:27 .gitignore -rw-r--r-- 1 root staff 0 May 2 16:27 _config.landscape.yml -rw-r--r-- 1 root staff 2441 May 2 16:27 _config.yml drwxr-xr-x 165 root staff 5280 May 2 16:27 node_modules -rw-r--r-- 1 root staff 57414 May 2 16:27 package-lock.json -rw-r--r-- 1 root staff 615 May 2 16:27 package.json drwxr-xr-x 5 root staff 160 May 2 16:27 scaffolds drwxr-xr-x 3 root staff 96 May 2 16:27 source drwxr-xr-x 3 root staff 96 May 2 16:27 themes
4. 生成第一篇博客
初始化Hexo以后其实就可以生成博客了。
1 2 3 4 5 6 7 8 9
################################################ # 启动本地博客页面 hexo s或者hexo server sh-3.2# hexo s INFO Validating config INFO Start processing Deprecated as of 10.7.0. highlight(lang, code, ...args) has been deprecated. Deprecated as of 10.7.0. Please use highlight(code, options) instead. https://github.com/highlightjs/highlight.js/issues/2277 INFO Hexo is running at http://localhost:4000 . Press Ctrl+C to stop.
################################################ # 创建新博客 hexo n或者hexo new sh-3.2# hexo n "我的第一篇博客" INFO Validating config INFO Created: /Users/kangyangwu/myblog/source/_posts/我的第一篇博客.md
################################################ # 为新的博客生成静态文件 hexo g或者hexo generate sh-3.2# hexo g INFO Validating config INFO Start processing INFO Files loaded in 88 ms INFO Generated: 2021/05/02/hello-world/index.html INFO Generated: 2021/05/02/我的第一篇博客/index.html INFO Generated: archives/2021/05/index.html INFO Generated: archives/2021/index.html INFO Generated: index.html INFO Generated: archives/index.html INFO 6 files generated in 27 ms
################################################ # 启动本地博客页面 sh-3.2# hexo s INFO Validating config INFO Start processing INFO Hexo is running at http://localhost:4000 . Press Ctrl+C to stop.
################################################ # 部署网页 hexo d或者hexo deploy sh-3.2# hexo d INFO Validating config INFO Deploying: git INFO Clearing .deploy_git folder... INFO Copying files from public folder... INFO Copying files from extend dirs... [master d553892] Site updated: 2021-05-02 17:47:15 Committer: System Administrator <root@Kangyangs-Mac.local> Your name and email address were configured automatically based on your username and hostname. Please check that they are accurate. You can suppress this message by setting them explicitly. Run the following command and follow the instructions in your editor to edit your configuration file:
git config --global --edit
After doing this, you may fix the identity used for this commit with:
git commit --amend --reset-author
9 files changed, 900 insertions(+), 6 deletions(-) create mode 100644 2021/04/29/kruskalMST/index.html create mode 100644 2021/05/02/使用ffmpeg合并多个mp4文件/index.html create mode 100644 archives/2021/04/index.html Username for'https://github.com': yangzaiky Password for'https://yangzaiky@github.com': Counting objects: 24, done. Delta compression using up to 8 threads. Compressing objects: 100% (15/15), done. Writing objects: 100% (24/24), 13.77 KiB | 2.29 MiB/s, done. Total 24 (delta 8), reused 0 (delta 0) remote: Resolving deltas: 100% (8/8), completed with 3 local objects. To https://github.com/YangzaiKY/yangzaiky.github.io.git 6fe509f..d553892 HEAD -> master Branch 'master'set up to track remote branch 'master' from 'https://github.com/YangzaiKY/yangzaiky.github.io.git'. INFO Deploy done: git