VSC4T Deployment Guide
Prerequisites
Before deployment, ensure you have the required plugins installed:
1
| npm install hexo-deployer-git --save
|
Deployment Steps
- Clean cache files:
- Generate static files:
- Deploy to remote repository:
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:
- Correct
relative_link
setting in _config.yml
- Use
url_for()
helper in theme templates
- 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.