简体   繁体   English

Jekyll在github上

[英]Jekyll on github

I rake new post on my local computer, and I pushed it to my github account successfully. 我在本地计算机上整理了一篇新文章,并将其成功推送到我的github帐户。 Before I pushed it to github, I use jekyll --server to scan my modified files, it's successful. 在将其推送到github之前,我使用jekyll --server扫描修改后的文件,成功了。

But after I pushed it to github, the pages on github is different to my local server? 但是在将其推送到github后,github上的页面与本地服务器不同吗? I waited 10mins and I also cleared my browser cache, it still does not work. 我等了10分钟,还清除了浏览器缓存,但仍然无法正常工作。

Are you sure you've committed the changes to your repository before pushing them to GitHub? 您确定已将更改提交到存储库,然后再将其推送到GitHub?

If you type in the terminal: 如果输入终端:

git status

You'll get a list of files that Git thinks have been modified, and it will tell you whether or not they've been added to the staging area. 您将获得Git认为已修改的文件的列表,它会告诉您是否已将它们添加到暂存区。

Add each file to the staging area with: 使用以下命令将每个文件添加到暂存区:

git add <<filename goes here>>

Then commit them with: 然后提交给他们:

git commit -m "<<commit message goes here>>"

Then finally push them to GitHub like this: 然后最终将它们像这样推送到GitHub:

git push

They should then show up on GitHub pages. 然后,它们应该出现在GitHub页面上。

Posting a link to your GitHub repository might also help us to diagnose your problem. 将链接发布到您的GitHub存储库也可能有助于我们诊断您的问题。

You didn't say what kind of page you are trying to put on Github. 您没有说要在Github上放置哪种页面。 There are 2 different types of pages: user pages and project pages. 有两种不同类型的页面:用户页面和项目页面。

Documentation from Github is here https://help.github.com/articles/user-organization-and-project-pages Github的文档在这里https://help.github.com/articles/user-organization-and-project-pages

If it's a project page, you need to push that into special branch called gh-pages. 如果是项目页面,则需要将其推入名为gh-pages的特殊分支。 It won't work from master branch. 它不能从master分支工作。

You'll also want to consider that Github currently runs Jekyll version 1.5.1 which is rather out-of-date with the online Jekyll documentation which describes version 2.0.3. 您还需要考虑到Github当前运行的Jekyll版本1.5.1与描述2.0.3版本的在线Jekyll文档相比已经过时了。

So for example, Collections do not work as described. 因此,例如,集合无法按所述方式工作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM