This plugin adds Org mode support to Jekyll and lets you write posts and pages in Org.
What’s the difference with org2jekll You don’t need to any org-publish-project-alist to starting write post, just start with any editor that org-mode supported
What’s the difference with org-jekyll? You don’t need to add some alien yaml in your org-mode file. You add specific org-mode headers and this will be used to format the jekyll post.
What’s the difference with happyblogger? No more external ruby script.
For experienced Jekyll users, you need to do 2 things to get jekyll-org
to work :
_config.yml
To use jekyll-org
with Jekyll, you need to have Ruby RubyGems and Jekyll installed. See how to do that here.
Create a new Jekyll project my-site
run:
jekyll new my-site
Create a Gemfile in the root of the project, and add at least the following lines:
source 'https://rubygems.org'
gem 'jekyll' , '>= 3.0.0'
gem 'jekyll-org', '>= 1.1.0'
Install the gems with bundler:
bundle install
To use the new converter add the following line to your _config.yml
:
plugins:
- jekyll-org
Create a new file with .org
extension in _posts
, and write the post with Org. That is all! Generate your Jekyll site as you usually do.
Instead of YAML the front matter is configured in the usual Org way, with no lines.
Below is an example of an Org post, featuring front matter, tags, tables, liquid templating and syntax highlighting. To render this example, remove the leading hash symbols (#) at #+begin_src
and #+begin_end
beforehand (this is a workaround for GitHub’s org rendering).
#+TITLE: Jekyll and Org together #+LAYOUT: post #+TAGS: jekyll org-mode "tag with spaces" This is a blog post about Jekyll and Org mode. ** org-table demo | a | b | c | d | e | |---+---+---+---+---| | 1 | 2 | 3 | 4 | 5 | ** Liquid demo #+liquid: enabled #+foo: hello world {{ page.foo }} or {{ site.time | date_to_xmlschema }} ** Code highlighting Jekyll-org also offers powerful support for code snippets: ##+begin_src ruby def print_hi(name) puts "Hi, #{name}" end print_hi('Tom') #=> prints 'Hi, Tom' to STDOUT. ##+end_src
The value of #+TAGS
is parsed into a list by splitting it on spaces, tags containing spaces can be wrapped into quotes.
By default the all content is exported to raw HTML with org-ruby, but you can add #+liquid: whatevervalue=
in the header. Then you can use Liquid tags.
For example, if your Org file contains
#+liquid: enabled #+foo: hello world {{ page.foo }} or {{ site.time | date_to_xmlschema }}
then you will get output like
<p>hello world</p> <p>or</p> <p>2014-07-02T08:20:28+08:00</p>
Alternatively, if you’d rather enable liquid by default for every org file being converted, you can enable it in your _config.yml file.
org: liquid: true
To enable source code highlighting, run bundle add pygments.rb
. If your Jekyll theme has built-in support for syntax highlighting, you’re all set! Otherwise, add a pygments
-compatible CSS file to your site’s /assets/css/
folder. You can find a bunch of CSS themes for pygments
in this repository, or create your own (some related pygments
documentation is here).
Then, add a source code block as you would in Org, for example Ruby:
require 'rubygems' require 'org-ruby' data = IO.read(filename) puts Orgmode::Parser.new(data).to_html
And the output will have code highlighting:
require 'rubygems'
require 'org-ruby'
data = IO.read(filename)
puts Orgmode::Parser.new(data).to_html
eggcaker <eggcaker@gmail.com>
MIT
layout title description tags category post jekyll的使用 jekyll jekyll jekyll 2017-02-02-jekyll-document jekyll 依赖ruby 你的环境必须已安装ruby,使用gem 管理各种包信息。 Install 安装Jekyll 事先要有相应的环境配置 Ruby RubyGems Linux, Unix,
站点地图(Site Map)作用之一是方便搜索引擎收纳网站中各个页面的 URL。关于如何让搜索引擎收纳你网站的 URL 可以看我的另外一篇博客:《如何让搜索引擎搜索到自己的个人博客网站(如何提交网站到各搜索引擎,如百度、必应Bing,以及提交页面URL的地址)》 站点地图一般使用 XML 文件,名为sitemap.xml。格式一般为: <?xml version="1.0" encoding="U
我的操作环境 阿里云 CentOS主机: LSB Version: :core-4.1-amd64:core-4.1-noarch Distributor ID: CentOS Description: CentOS Linux release 7.4.1708 (Core) Release: 7.4.1708 Codename: Core 1. 安装ruby(同时会自动
按照 在 Windows 上安装 Jekyll 操作。 参考链接 在 Windows 上安装 Jekyll Setting up your GitHub Pages site locally with Jekyll - github Run Jekyll on Windows 故障诊断 问题一 C:\WINDOWS\system32>gem install jekyll ERROR
Jekyll 是一个免费的简单静态网页生成工具,可以配合第三方服务例如 Disqus 实现一些扩展功能,不需要数据库支持。并且 Jekyll 可以部署在Github 或 Coding 上,可以绑定自己的域名,而且目前这是完全免费的。 1,Git 安装 搭建博客需要用到 git,git --version 命令可查看本机是否已安装 git,若未安装可参考这篇博文进行安装。 2,安装 Homebrew
Jekyll 是一个简单的免费的Blog生成工具,类似WordPress。但是和WordPress又有很大的不同,原因是jekyll只是一个生成静态网页的工具,不需要数据库支持。但是可以配合第三方服务,例如discuz。最关键的是jekyll可以免费部署在Github上,而且可以绑定自己的域名。 快速安装指令: gem install jekylljekyll new my-awesome-sit
中文网站 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-admin 是一个 jekyll 插件,为用户提供了传统 CMS(内容管理系统)风格的图形化界面来创作内容和管理 jekyll 网站。 该项目分为两部分。基于 Ruby 的 HTTP API 处理 jekyll 和文件系统的操作部分,以及在这个 API 基础上的基于 JavaScript 的前端部分。 安装: 就像安装其他插件一样,请参阅 jekyll 文档的插件安装部分安装 jek
Jekyll的增强版,使用Markdown来写日志。 Jekyll采用静态文件方式管理,不需要数据库即可支持一个独立博客站点,在github-pages平台上被普遍采用。Jekyll-Bootstrap在Jekyll基础上,集成了twitter-bootstrap界面风格和一些实用的插件,并且易于扩展。
Jekyll Docker Jekyll Docker is a software image that has Jekyll and many of its dependencies ready to use for you in an encapsulated format. It includes a default set of gems, different image types wi
jekyll-katex This is a Jekyll plugin for performing compile-time math rendering via the KaTeX library.KaTeX is a library for rending math on the web using LaTeX, similar to MathJax. KaTeX differs from
�� Jekyll Spaceship �� Jekyll plugin for Astronauts. Install | Config | Usage | Credits | License Built with ❤︎ by jeffreytse and contributors Spaceship is a minimalistic, powerful and extremely custo
reveal-jekyll Transforms Markdown files into presentation slides using reveal.js and Jekyll. The theme is based on Solarized Colors (by Ethan Schoonover) containing a light and a dark theme. reveal-je