 
 (add-hook 'java-mode-hook #'ar/java-mode-hook-function)
 
+(use-package ox-html
+  :commands (org-html-export-to-html)
+  :config
+  (setq org-html-preamble t)
+  (setq org-html-preamble-format '(("en" "
+<table id='contact-header'>
+  <tr>
+    <td id='contact-left'>
+   </td>
+    <td id='contact-right'>
+      <a href='https://twitter.com/xenodium'>twitter</a>
+      <a href='http://github.com/xenodium'>github</a>
+      <a href='http://uk.linkedin.com/in/xenodium'>linkedin</a>
+      <a href='mailto:me@xenodium.com'>email</a>
+    </td>
+  </tr>
+</table>")))
+  (setq org-html-postamble nil)
+  (setq org-html-format-drawer-function #'ar/org-html-export-format-drawer))
+
 (defun ar/export-blog-to-html ()
   "Export blog to HTML."
   (interactive)

(ignore-errors (use-package org-beautify-theme :ensure t))

(use-package org-bullets :ensure t)

;; Tweaking org HTML export.
(setq ar/preamble-format-string "
<table id='contact-header'>
  <tr>
    <td id='contact-left'>
   </td>
    <td id='contact-right'>
      <a href='https://twitter.com/xenodium'>twitter</a>
      <a href='http://github.com/xenodium'>github</a>
      <a href='http://uk.linkedin.com/in/xenodium'>linkedin</a>
      <a href='mailto:me@xenodium.com'>email</a>
    </td>
  </tr>
</table>")
(setq org-html-preamble t)
(setq org-html-preamble-format `(("en" ,ar/preamble-format-string)))
(setq org-html-postamble nil)

;; From http://emacsredux.com/blog/2015/01/18/clear-comint-buffers/
(defun ar/comint-clear-buffer ()

    (org-html-export-to-html)
    (browse-url (format "file:%s" (expand-file-name
                                   "~/stuff/active/blog/index.html")))))

(use-package flyspell :commands (flyspell-mode-on))

(defun ar/org-mode-hook-function ()
  "Called when entering org mode."
