配置步骤

  1. 编辑 ~/.zshrc 文件:

    open ~/.zshrc
  2. 在文件中添加以下内容:

    export NVM_DIR="$HOME/.nvm"
    [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"  # 加载 nvm
    [ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"  # 加载 nvm bash_completion
     
    alias blog='cd /Users/butcher/Library/Mobile\ Documents/com~apple~CloudDocs/quartz && npx quartz sync'
    alias build='cd /Users/butcher/Library/Mobile\ Documents/com~apple~CloudDocs/quartz && npx quartz build --serve'
  3. 刷新配置:

    source ~/.zshrc

使用方法

  • 同步博客:
    blog
  • 构建并预览:
    build