How to use HTML as input to Hakyll

I use Hakyll for mine.

I am currently writing my posts in emacs org-mode , and then export org-mode to markdown . Hakyll then turns this markdown into HTML.

This works fine, but I would like to get finer control over the HTML that gets the message. I would prefer to do org-mode export to HTML and then Hakyll uses this HTML as input.

Note: my blog works fine with labeling, I just want to use (generated by org-mode) HTML as input.

Hakyll's opening page says: "WRITE YOUR CONTENT IN WHATEVER FORMAT YOU PREFER", so HTML input works (I tried this somewhat successfully).

The Hakyll's FAQ says use getResourceBodyinstead pandocCompilerwhen entering HTML.

I still haven't figured out how to handle the title, tags, and teasers when using HTML as input.

A typical markdown post will be

---
title: Switching to Hakyll
tags: hakyll, haskell, pandoc, emacs, org-mode, markdown
---

I chose [Hakyll](http://jaspervdj.be/hakyll/) for blog software ...

<!-- MORE -->

I write posts in [Emacs](https://en.wikipedia.org/wiki/Emacs) ...

QUESTIONS:

  • where / how can I put / format the title and tags on the HTML tab?
  • What code do I use for header / tag processing?

  • where / how to put / format the "teaser" marker on the HTML input?

  • What code do I use to process the teaser?

Examples would be great, or at least pointers to the relevant document.

UPDATE

@duplode, pandocCompiler getResourceBody, . . HTML.

HTML :

.
.
.
</head>
<body>
<div id="content">
<h1 class="title">2013-06-30-test-post</h1>
---
title: My first org-mode post
tags: emacs, org-mode
---

<p>
Does it work?
</p>

<!-- MORE -->

<p>
This is the rest.
</p>
+3
2

. (.. ---) Hakyll . . pandocCompiler getResourceBody, , pandoc, .

+1

HTML- , , applyAsTemplate

.

0

All Articles