0%

hexo安装记录

Mac安装

  1. 安装git
  2. 安装node.js
  3. npm
  4. 安装hexo
    1
    2
    3
    % npx hexo inti wekkin_note
    % cd wekkin_note
    % npm install
    安装完成后文件目录如下:
    1
    2
    3
    4
    5
    6
    7
    8
    9
    .
    ├── _config.landscape.yml
    ├── _config.yml
    ├── node_modules
    ├── package-lock.json
    ├── package.json
    ├── scaffolds
    ├── source
    └── themes
    启动服务
    1
    hexo server
    默认情况下,访问网址为: []http://localhost:4000/

安装主题 indigo

[参考文]https://github.com/yscoder/hexo-theme-indigo/wiki/%E5%AE%89%E8%A3%85
替换原本的landscape

git

1
2
3
4
5
6
7
8
(base) ➜  blog ssh-keygen -t rsa -C 邮箱地址
Generating public/private rsa key pair.
Enter file in which to save the key (/Users/wekkin/.ssh/id_rsa): 
Created directory '/Users/wekkin/.ssh'.
Enter passphrase (empty for no passphrase): 
Enter same passphrase again: 
Your identification has been saved in /Users/wekkin/.ssh/id_rsa
Your public key has been saved in /Users/wekkin/.ssh/id_rsa.pub

常用命令

1
2
3
4
5
6
7
8
hexo new "name"       # 新建文章
hexo new page "name" # 新建页面
hexo g # 生成页面
hexo d # 部署
hexo g -d # 生成页面并部署
hexo s # 本地预览
hexo clean # 清除缓存和已生成的静态文件
hexo help # 帮助

发布github同步

  • 创建仓库
  • branch: main

改主题

网站

其他主题