Best way to get an existing hexo site into Github (not for hosting)

108 views
Skip to first unread message

William Gant

unread,
Jun 1, 2016, 10:33:16 PM6/1/16
to Hexo
Greetings,
I have a couple of existing sites that I've built up in hexo. I noted that the hexo install actually uses git. How are folks using git to source control their hexo blogs? I don't need to deploy to github pages, as I have my own hosting elsewhere, but I'd like to start using source control on the stuff I'm building. What's the best way to take an existing hexo site and get it loaded into an empty github repository? Any gotchas I need to worry about?

Thanks,
Will

christopher fujino

unread,
Jun 15, 2016, 11:04:13 PM6/15/16
to Hexo
hexo-repo-directory$ git init
$ git add
.
$ git commit
-m 'My great blog!'
$ git remote add origin git
-repo-url.git
$ git push
-u origin master

Hexo uses git to initialize your blog, but doesn't actually use git to track the project, so you can track it as you would any other new project.

jayxhj

unread,
Jun 16, 2016, 10:32:21 PM6/16/16
to Hexo

Just push your source code to GitHub. It includes following files and directories:
├── README.md
├── _config.yml
├── db.json
├── package.json
├── scaffolds
├── source
├── static
└── themes

Then anyone who have the source code could make a copy of your dependencies and files.

在 2016年6月2日星期四 UTC+8上午10:33:16,William Gant写道:
Reply all
Reply to author
Forward
0 new messages