This project has been deprecated, please use ox-hugo
Lovely you:
- Writing with Org.
- Making website with Hugo.
Yean! ox-hugo
- Manual
Download:
$ git clone https://github.com/helloyi/ox-hugo /your/ox-hugo/path
Config emacs:
(add-to-list 'load-path (expand-file-name "/your/ox-hugo/path"))
(require 'ox-hugo)
- Automatic
$ git clone https://github.com/helloyi/ox-hugo /your/ox-hugo/path
$ mv /your/ox-hugo/path/ox-hugo.el /to/your/org/lisp/dir
First, setting hugo metadata format with #+HUGO_METADATA_FORMAT
(default toml
).
This keyword can be set to either toml
or yaml
.
Supported keywords:
org keyword | hugo metadata | default |
---|---|---|
#+TITLE | title | <filename> |
#+DATE | date | <export time> |
#+HUGO_DESCRIPTION | description | <nil> |
#+HUGO_TAGS | tags | <nil> |
#+HUGO_CATEGORIES | categories | <nil> |
#+HUGO_SLUG | slug | <nil> |
#+HUGO_URL | url | <nil> |
#+HUGO_METADATA_FORMAT | “toml” |
- Default metadata export
org source:
#+HUGO_CATEGORIES: test
markdown source:
+++
title = "filename"
date = "2016-07-16 22:44:35 +0800"
categories = ["test"]
+++
- Metadata export
org source:
#+TITLE: test
#+DATE: <2015-07-05 21:30 +0800>
#+HUGO_TAGS: test tag1 tag2
#+HUGO_CATEGORIES: test
#+HUGO_DESCRIPTION: Just test
markdown source:
+++
title = "test"
date = "2015-07-05 21:30:00 +0800"
description = "Just test"
tags = ["test", "tag1", "tag2"]
categories = ["test"]
+++
- Source Block export
org source:
#+BEGIN_SRC go |
var a string |
var b int64 |
#+END_SRC |
markdown source:
{{< highlight go >}}
var a string
var b int64
{{< /highlight >}}