- Node.js (khuyến nghị LTS)
- Git
npm installTạo file Markdown mới với front-matter tự động:
npx hexo new post "tieu-de-bai-viet"File sẽ được tạo tại: source/_posts/tieu-de-bai-viet.md
Mở file vừa tạo và chỉnh sửa:
- Sửa front-matter (title, date, tags, categories, ...)
- Viết nội dung Markdown bên dưới
Chạy server local để xem trước:
npm run clean
npm run serverMở http://localhost:4000/ để xem.
Commit và push lên main:
git add source/_posts/tieu-de-bai-viet.md
git commit -m "Add post: tieu-de-bai-viet"
git push origin mainGitHub Actions sẽ tự động:
- Build site từ source code
- Deploy lên branch
gh-pages - Site sẽ cập nhật tại
https://vuk3r.github.io
Xóa file Markdown trong source/_posts/, sau đó:
git add source/_posts/
git commit -m "Remove post: ten-bai"
git push origin mainTheme đang dùng: butterfly (cấu hình chính ở _config.butterfly.yml).
main: Chứa source code (Markdown, config, themes)gh-pages: Chứa built files (HTML, CSS, JS) - tự động tạo bởi workflow