如何配置GitHub以使用不受支持的Jekyll站点插件? [英] How do I configure GitHub to use non-supported Jekyll site plugins?
问题描述
我刚刚为我的Jekyll博客创建了一个很棒的画廊,它完美地构建在我的localhost:4000上。但是,GitHub页面不支持我正在使用的Jekyll Gallery Generator插件: https:// github.com/ggreer/jekyll-gallery-generator
我读到了使用FTP在传统主机上托管Jekyll的替代方法(上传_site目录) http://jekyllrb.com/docs/deployment-methods/ 然而,而不是重新配置我的整个网站和托管,如果GitHub页面可以以某种方式使用,即使我使用的是不受支持的插件,那也是非常棒的。
什么是解决方法?
根据您处理用户/组织( UO )网站或项目网站( P ),请从工作文件夹 git init $>中执行:
- c $ c>
-
git remote add origin git@github.com:use rName / userName.github.io.git
( UO )或git remote add origin git@github.com:userName / repositoryName.git
( P ) -
jekyll new。
创建您的代码库 在 _config.yml 中添加 - ,将 baseurl 参数设置为
baseurl:''
strong> UO )或baseurl:'/ repositoryName'
( P ) 中的 - .gitignore 添加 _site ,它将在另一个分支中进行版本控制 $ c>将创建目标文件夹和构建站点。
-
git checkout -b来源
( UO )或git checkout master
( P ) -
git add -A
-
git commit -mjekyll基础来源
提交您的源代码
-
git push origin source
( UO )或git push origin master
的 P 斯特龙g>)将资源推送到适当的分支中 -
cd _site
-
touch .nojekyll
,这个文件告诉gh页面不需要编译 -
git init
init存储库 -
git remote add origin git@github.com:userName / userName.github.io.git
( UO )或git remote add origin git@github.com:userName / repositoryName.git
( P li>
-
git checkout master
( UO )或git checkout -b gh-pages
( P )将此存储库放在适当的分支上 -
git add -A
-
git commit -mjekyll first build
提交您的站点代码 code> git push origin master ( UO )或git push origin gh-pages
( P )
您现在有类似 Octopress 一>确实。看看他们的rake文件,里面有一些很好的评论。 I just created a great gallery for my Jekyll blog which builds perfectly on my localhost:4000. However, GitHub pages doesn't support the Jekyll Gallery Generator plug-in I am using: https://github.com/ggreer/jekyll-gallery-generator I read about the alternative method of hosting Jekyll on a traditional host using FTP (uploading the _site directory) http://jekyllrb.com/docs/deployment-methods/ However, rather than reconfigure my entire site and hosting, It would be great if GitHub Pages could be used somehow even though I'm using a non-supported plugin. What is a workaround for this? Depending if you deal with a User/Organization (UO) site or a Project site (P), do : You now have something like Octopress does. Look at their rake file, there are some nice comments inside. 这篇关于如何配置GitHub以使用不受支持的Jekyll站点插件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
git init
git remote add origin git@github.com:userName/userName.github.io.git
(UO) or git remote add origin git@github.com:userName/repositoryName.git
(P)jekyll new .
creates your code basebaseurl: ''
(UO) or baseurl: '/repositoryName'
(P)jekyll build
will create the destination folder and build site.git checkout -b sources
(UO) or git checkout master
(P)git add -A
git commit -m "jekyll base sources"
commit your source codegit push origin sources
(UO) or git push origin master
(P) push your sources in the appropriate branchcd _site
touch .nojekyll
, this file tells gh-pages that there is no need to buildgit init
init the repositorygit remote add origin git@github.com:userName/userName.github.io.git
(UO) or git remote add origin git@github.com:userName/repositoryName.git
(P)git checkout master
(UO) or git checkout -b gh-pages
(P) put this repository on the appropriate branchgit add -A
git commit -m "jekyll first build"
commit your site codegit push origin master
(UO) or git push origin gh-pages
(P)