简体   繁体   English

如何阻止GitHub重新生成Jekyll网站?

[英]How do I stop GitHub from regenerating Jekyll site?

I created a Jekyll site and committed it to GitHub. 我创建了一个Jekyll站点并将其提交给GitHub。 However, as I'm using a custom plugin I'd like to turn off the auto generation Pages does as the site looks a bit different than on my localhost. 但是,由于我正在使用自定义插件,我想关闭自动生成页面,因为该网站看起来与我的本地主机有点不同。

My _config.yml includes only the following: 我的_config.yml仅包含以下内容:

server:      false
auto:        false

source:      .
destination: ./_site

markdown:    maruku
permalink:   date

Try as I might, I can't stop GitHub Pages from regenerating the site. 尽我所能,我不能阻止GitHub页面重新生成网站。 There should be a big blue "Read More" just under the blockquote on the home page http://omgcarlos.com 在主页http://omgcarlos.com上的blockquote下面应该有一个大的蓝色“Read More”

My repo is here: https://github.com/OMGCarlos/omgcarlos.github.com/ 我的回购在这里: https//github.com/OMGCarlos/omgcarlos.github.com/

Does Pages simply ignore the config file and regenerate it anyways? Pages是否只是忽略配置文件并重新生成它?

Just add a file named .nojekyll to your repos gh-pages -branch root and there will be no more autogeneration. 只需将一个名为.nojekyll的文件添加到你的repos gh-pages -branch root中,就不会再有自动生成了。

Source-Link 源链接

If you have a repository at [username].github.com, the contents of the master branch will be served at [username].github.com. 如果您在[username] .github.com上有一个存储库,则主分支的内容将在[username] .github.com上提供。 If that repository is a Jekyll site, it will be generated. 如果该存储库是Jekyll站点,则会生成该存储库。

To avoid the problem you have, you need to make sure that master only contains the contents of your _site/ directory. 为了避免您遇到的问题,您需要确保master只包含_site /目录的内容。 You can then keep the rest of your source in another branch (such as 'source'). 然后,您可以将其余的源保留在另一个分支中(例如“source”)。 Octopress does this in a nice way (http://octopress.org/docs/deploying/github/) but really, this is just a problem of managing your git repository - you want to be generating the _site directory from the 'source' branch, and keeping the _site Octopress以一种很好的方式做到这一点(http://octopress.org/docs/deploying/github/)但实际上,这只是管理git存储库的一个问题 - 你想从'source'生成_site目录分支,并保持_site

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

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