# 核心自定义配置 vim ~/.config/hypr/UserConfigs/UserKeybinds.conf # 自定义快捷键 vim ~/.config/hypr/UserConfigs/UserSettings.conf # 窗口装饰、手势、布局 vim ~/.config/hypr/UserConfigs/Monitors.conf # 显示器分辨率、位置 vim ~/.config/hypr/UserConfigs/ENVariables.conf # 环境变量 (NVIDIA 驱动设置) vim ~/.config/hypr/UserConfigs/Startup_Apps.conf # 自启动项 vim ~/.config/hypr/UserConfigs/WorkspaceRules.conf # 工作区绑定规则
# UI 界面配置 vim ~/.config/waybar/config # Waybar 布局 vim ~/.config/waybar/style.css # Waybar 样式 vim ~/.config/kitty/kitty.conf # 终端配置
# 使用 Vim 键位切换窗口焦点 bind = SUPER, H, movefocus, l bind = SUPER, L, movefocus, r bind = SUPER, K, movefocus, u bind = SUPER, J, movefocus, d
# 使用 Vim 键位移动窗口位置 bind = SUPER SHIFT, H, movewindow, l bind = SUPER SHIFT, L, movewindow, r bind = SUPER SHIFT, K, movewindow, u bind = SUPER SHIFT, J, movewindow, d
hexo-cli: 4.3.2 os: linux 6.17.7-arch1-1 Arch Linux node: 25.1.0 # ... 其他版本信息
初始化博客
1
hexo init "你的博客目录名称"# 目录名称不含空格时双引号可省略
因网络状况不同,初始化耗时约一分钟:
1 2 3 4
INFO Cloning hexo-starter https://github.com/hexojs/hexo-starter.git INFO Install dependencies warning hexo-renderer-stylus > stylus > glob@7.2.3: Glob versions prior to v9 are no longer supported INFO Start blogging with Hexo!
进入博客目录:
1
cd"博客目录"
查看目录结构:
1 2 3 4
ls -la
# 或者使用 tree 命令 tree -L 1
目录结构说明:
_config.yml: 全局配置文件,包含网站名称、描述、作者、语言、主题等设置
scaffolds: 模板文件,用于生成新页面或博客文章
source: 存放 Markdown 源文件,_posts 文件夹存放所有博客文章
themes: 主题目录,Hexo 有丰富的主题支持
创建新文章
1 2 3
hexo new post "test"# 在 source/_posts/ 目录生成 'test.md' hexo generate # 生成静态 HTML 文件到 /public 文件夹 hexo server # 本地预览,访问 http://localhost:4000
添加 Netlify 构建脚本
为了方便 Netlify 部署,在 package.json 中添加构建命令:
1 2 3 4 5 6 7 8 9
{ "scripts":{ "build":"hexo generate", "clean":"hexo clean", "deploy":"hexo deploy", "server":"hexo server", "netlify":"npm run clean && npm run build"// 新增此行 } }
使用 Vim 编辑文件:
1 2
vim package.json # 按 i 进入插入模式,编辑内容,按 ESC 后输入 :wq 保存退出