Skip to content

peterewills/ox-jekyll-lite

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Org Export Engine for Jekyll on Markdown

This is a simple org export engine for Jekyll Markdown, built on top of ox-md.

This is a fork of @gonsie/ox-jekyll-md, incorporating some changes based on @larstvei/ox-gfm and @kaushalmodi/ox-hugo.

See my blog post for more details.

Installation

To use, install directly from github, by doing

cd ~/.emacs.d/lisp
git clone https://github.com/peterewills/ox-jekyll-lite.git

and then in your .emacs add

(add-to-list 'load-path "~/.emacs.d/lisp/ox-jekyll-lite/")
(require 'ox-jekyll-lite)
(setq org-jekyll-project-root "~/code/jekyll/my-jekyll-site/")

Setting org-jekyll-project-root allows for file links to be exported treating the Jekyll root directory as the root of the filepath (see below).

Usage

ox-jekyll-lite is designed to work with a single Jekyll project, and with one .org file per post. To use, write a post in org mode. The filename should follow the usual jekyll convention, so this one might be called 2019-09-24-post.org.

#+TITLE: My Cool Post
#+SUBTITLE: This will be the excerpt.
#+DATE: 2019-09-24

#+STARTUP: showall indent
#+OPTIONS: toc:nil 
#+OPTIONS: tex:t

Get ready for some cool posty stuff

 * Org Mode and the Meaning of Life

and then do C-c C-e j j, and the following will get written to 2019-09-24-post.md

---
title: "My Cool Post"
excerpt: "This will be the excerpt."
date: 2019-09-24
categories: 
- post
tags: 
---
Get ready for some cool posty stuff

# Org Mode and the Meaning of Life

<!----- Footnotes ----->

Make sure to add *.org to your exclude list in _config.yaml, so that Jekyll doesn’t try to render the org files. If you render images (LaTex) in your org files, you’ll also want to add ltximg to your exclude list.

Features

  • Translates latex delimiters in org into appropriate MathJax delimiters.
  • Exports footnotes in proper Markdown (not HTML), so that they play nice with Jekyll themes.
  • Files are linked relative to the Jekyll root directory, if possible (set org-jekyll-project-root)
  • Org links to images are rendered appropriately.

If you have file links in your .org file, ox-jekyll-lite will attempt to render them relative to the root directory of the jekyll project, so that the files resolve correctly when Jekyll generates your site. If the file is not under the Jekyll directory, then a warning message will be printed.

See the demo org file for more details on what things get rendered.

About

Org export engine for Jekyll on Markdown

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Emacs Lisp 100.0%