If you use some plugins with your Jekyll blog, chances are you can nothave your blog generated by GitHub Pages.First of all, because they do not allowcustom plugins.This is where jekyll-github-deploy (a.k.a. jgd) comes in: it willautomatically build your Jekyll blog and push it to your gh-pagesbranch. You may want to read this blog post before you startusing this tool:Deploy Jekyll to GitHub Pages.
It is assumed that your blog is in the home directory of your repo.
Install it first:
$ gem install jgd
Run it locally:
$ jgd
Now your site is deployed to gh-pages
branch of your repo. Done.
Below is a list of all command line options.
Option | Description |
---|---|
-u or --url |
The GitHub URL. Defaults to th URL of your current project. |
-b or --branch |
The branch to push your site to. Defaults to gh-pages . If the branch does not exist, it will be created. |
-r or --branch-from |
The source branch. Defaults to master . |
-c or --config |
Name of the optional deploy config file. See Production variables below for more information. |
-d or --drafts |
Adds the --drafts option to Jekyll so that it will build draft posts. |
-h or --help |
Displays a list of all options. |
If you need to have different values for your deployed blog, just add a_config-deploy.yml
file in your project's root and you're set. Valuesre-defined in _config-deploy.yml
will override those defined in_config.yml
.
Typical usage includes changing site url
, disable disqus or ga indevelopment...., you name it.
While _config-deploy.yml
is the default, you may specify any configfile by using the --config
command line option.
For example:
$ jgd -c _config-deploy-develop.yml -r develop -b gh-pages-develop
This is how I configure my Jekyll blogto be deployed automatically by travis-ci:
branches:
only:
- master
env:
global:
- secure: ...
install:
- bundle
script: jgd -u http://yegor256:$PASSWORD@github.com/yegor256/blog.git
The environment variable $PASSWORD
is set throughenv/global/secure
, as explainedhere.
Don't forget to add gem require 'jgd'
to your Gemfile
.
You can use SSH key instead. First, you should encrypt it:
$ travis encrypt-file id_rsa --add
Then, use the URI that starts with git@
:
script:
- jgd -u git@github.com:yegor256/blog.git
In order to build a package locally run below commands.
gem build jgd.gemspec
gem install jgd-<version>.gem
First, installRuby 2.3+,Rubygems,andBundler.Then:
$ bundle update
$ bundle exec rake --quiet
$ ./tesh.sh
The build has to be clean. If it's not, submit an issue.
Then, make your changes, make sure the build is still clean,and submit a pull request.
http://jekyllbootstrap.com/ 可以直接用jekyll Bootstrap,配置简单,按照网站教程弄即可 可以绑定自己域名 jekyll作为一款静态博客引擎还是很不错的,喜欢折腾和极简主义的朋友可以尝试下 速度比wp等快许多
下载安装 http://www.git-scm.com/download/win 添加到PATH: C:\Program Files\Git\cmd; C:\Program Files\Git\bin; 设置账户 git config --global user.name "Mo Yummy" git config --global user.email "mo.yummy@example.com
中文网站 jekyllcn 快速开始 ~ $ gem install jekyll bundler ~ $ jekyll new my-awesome-site ~ $ cd my-awesome-site ~/my-awesome-site $ bundle install ~/my-awesome-site $ bundle exec jekyll serve # => 打开浏览器 http
本文向大家介绍jekyll GitHub页面,包括了jekyll GitHub页面的使用技巧和注意事项,需要的朋友参考一下 示例 GitHub为用户或组织和项目站点提供无限托管。Jekyll和静态文件均可用。 以下是在Github上托管Jekyll博客的步骤。 设定 用户或组织站点 创建一个名为username.github.io的存储库,其中username是您在GitHub上的用户名(或组织名
Liquid 语法 liquid 语法网站 Liquid 是 Ruby 的一个模版引擎库,Jekyll中用到的Liquid标记有两种:输出和标签。 Output 标记:变成文本输出,被2层成对的花括号包住,如: {{content}} Tag 标记:执行命令,被成对的花括号和百分号包住,如: {% command %} Jekyll 输出 Output 示例: Hello {{name}} Hel
我天真地以为只需在post.md页面中添加带有内容的标记就会很容易,如下所示: 但我看到的不是图像,而是SVG代码(在Firefox中)。到目前为止还没有找到任何办法来解决看起来很简单的事情。在jekyll/liquid减价范围内有可能吗? > 我想用d3.js来操作svg代码,所以我假设我需要嵌入svg代码,而不是作为外部映像文件引用它。 我可以直接用d3.js生成初始的svg内容(这是可行的)
Jekyll 是一个简单的免费的Blog生成工具,类似WordPress。但是和WordPress又有很大的不同,原因是jekyll只是一个生成静态网页的工具,不需要数据库支持。但是可以配合第三方服务,例如discuz。最关键的是jekyll可以免费部署在Github上,而且可以绑定自己的域名。 快速安装指令: gem install jekylljekyll new my-awesome-sit
jekyll-admin 是一个 jekyll 插件,为用户提供了传统 CMS(内容管理系统)风格的图形化界面来创作内容和管理 jekyll 网站。 该项目分为两部分。基于 Ruby 的 HTTP API 处理 jekyll 和文件系统的操作部分,以及在这个 API 基础上的基于 JavaScript 的前端部分。 安装: 就像安装其他插件一样,请参阅 jekyll 文档的插件安装部分安装 jek