Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

经常在linux 和windows切换,两个系统如何使用同一个hexo程序 #752

Closed
jwangkun opened this issue Jul 29, 2014 · 7 comments
Closed
Labels
question Needs help in usage

Comments

@jwangkun
Copy link

经常在linux 和windows切换,两个系统如何使用同一个hexo程序发布文章,每次写文章都要切换到linxu上取发布,很不方便

@tommy351
Copy link
Member

Why not install Hexo on Windows?

@jwangkun
Copy link
Author

安装了,你的意思是把两个安装成一样的?我的意思是如何使两个系统上的hexo程序是一样的 ,当然可以配置成一样,一样的主题,文章也git clone一份,是这个意思?

@chenall
Copy link
Contributor

chenall commented Jul 31, 2014

如果在同一台机器上不是很简单吗?使用相同的目录就行了.

hexo程序在linux下安装一个,在Windows下安装一个.

文章目录使用同一个目录,在Windows和linux下发布的应该没有什么差别吧.

我自己用windows,发布是通过github的webhook功能自动发布的,使用的是linux系统.

@Xuanwo
Copy link
Contributor

Xuanwo commented Aug 2, 2014

直接把Blog所在的文件夹当成一个git库来同步就OK

@meowtech
Copy link

meowtech commented Aug 3, 2014

@Xuanwo 正要这么说,发现你早已回答!

@Xuanwo
Copy link
Contributor

Xuanwo commented Aug 5, 2014

补充一下使用Blog文件夹同步的几个注意事项:

  1. 如果主题是通过git管理的,需要将主题文件夹下的.git文件夹删除,才能同步Blog文件夹(.git文件夹是隐藏的,需要显示隐藏文件才能删除,Linux下需要rm -rf命令才能删除,Mac没用过,不清楚)。
  2. 按照Blog目录下自带的.gitignore文件,node_modules文件夹是不会同步的,所以同步之后需要自己再次进行npm install,但是注意,不要进行hexo init了,否则_config.yml全都白弄了。

然后给你看一下同步之后的目录:
https://github.com/Xuanwo/xuanwo.github.io/tree/blog

推荐一下里面的git shell.lnk文件,自带启动参数,无需配置git和nodejs环境,直接可以在同一个窗口运行git和hexo。

另外,如果问题解决了,请关闭issue;遇到相同问题,请输入 #752 调用本issues,谢谢。
减少issues的量,方便作者解决新的问题而不是淹没在重复的问题之中。
另外,真心建议提问前先搜索再提问。

@leesei
Copy link
Member

leesei commented Dec 2, 2014

Please close this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Needs help in usage
Projects
None yet
Development

No branches or pull requests

6 participants