Why is my org mode publish derived backend not reconized in the code snipped below?
(if (org-export-derived-backend-p backend 'jekyllHtmlPost)
This is my complete init.el
;;; package --- Summary
;;; Commentary:
;;; Code:
(require 'cl-lib)
;; -*- coding: utf-8; lexical-binding: t; -*-
(require 'ox-org)
(require 'ox-publish)
(message "Arquivo init.el carregado com sucesso!")
;;https://pank.eu/blog/blog-setup.html
(defun configure_jekyll_front_matter (output backend info)
"Configure Jekyll front matter after jekyllHtmlPost publish backend.OUTPUT BACKEND INFO."
(if (org-export-derived-backend-p backend 'jekyllHtmlPost)
;;this is never executed
(message "jekyllHtml backend")
(message "not jekyllHtml"))
; (setq frontMatter (format "---\ntitle:%s\nauthor:%s\nlayout:%s \nexcerpt:%s\ndate:\n---\n"
; (org-export-data (or (plist-get info :title) "?Title?") info)
; (org-export-data (or (plist-get info :author) "?author?") info)
; (org-export-data (or (plist-get info :jekyll_layout) "?jekyll layout here?") info)
; (org-export-data (or (plist-get info :jekyll_excerpt) "?post excerpt here? ") info)
; ))
;(concat frontMatter output)
)
(add-to-list 'org-export-filter-final-output-functions
'configure_jekyll_front_matter)
;;https://github.com/theodorewiles/org-mind-map/issues/22
(org-export-define-derived-backend 'jekyllHtmlPost 'html
:menu-entry
'(?j "Jekyll HTML post"
((?J "As Body HTML buffer" org-html-export-as-html)
(?j "As Body HTML file" org-html-export-to-html)
(?o "As Body HTML file and open"
(lambda (a s v b)
(if a (org-html-export-to-html t s v b)
(org-open-file (org-html-export-to-html nil s v b)))))))
:options-alist
'((:with-toc nil nil nil)
(:creator nil nil nil)
(:html-doctype "HTML_DOCTYPE" nil fzl-jekyll-org-html-doctype))) ;; Never include HTML's toc)
(defun fzl-jekyll-org-html-doctype (info)
"Return correct html doctype tag from org-html-doctype-alist,
or the literal value of :html-doctype from INFO if :html-doctype
is not found in the alist.
INFO is a plist used as a communication channel."
(message "<><><><><><><><><><<>< (defun fzl-jekyll-org-html-doctype (info)...")
)
;;; init.el ends here
My Elisp is hard :(
Is the answer on "How to do backend-dependent actions in org-mode export" not a suitable aproach in my case?