VSC4T Blog Deploy Guide

VSC4T Deployment Guide

Prerequisites

Before deployment, ensure you have the required plugins installed:

1
npm install hexo-deployer-git --save

Deployment Steps

  1. Clean cache files:
1
hexo clean
  1. Generate static files:
1
hexo generate
  1. Deploy to remote repository:
1
hexo deploy

Or use the shorthand command:

1
hexo clean && hexo generate && hexo deploy

Or

1
hexo clean && hexo g && hexo d

Common Issues

ERROR Deployer not found: git

If you encounter ERROR Deployer not found: git, install the git deployer plugin:

1
npm install hexo-deployer-git --save

Path Configuration

Ensure correct URL and root directory in _config.yml:

1
2
url: https://yourusername.github.io/your-repo-name
root: /your-repo-name/

For user sites (username.github.io), set root to /:

1
2
url: https://yourusername.github.io
root: /

Resource Path Issues

If resource paths are incorrect, check:

  1. Correct relative_link setting in _config.yml
  2. Use url_for() helper in theme templates
  3. Use forward slashes / instead of backslashes \

Security Notes

Important: Never include sensitive keys or tokens in public config files. Use environment variables or GitHub Actions secrets.