Best way to replace a transcoder? #728
Unanswered
rossabaker
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm trying to extend the
org-hugo-src-block
encoder with additional functionality. One way to do this is to define a derived backend:The problem is the export commands. There's a substantial amount of logic in
org-hugo-export-wim-to-md
and its related helpers. The'hugo
backend is hardcoded into a handful of calls toorg-export
functions throughout ox-hugo.el. To use my simple transcoder in a derived backend, it seems like I'd be copying hundreds of lines of export code.My interim solution is something more destructive:
(map-put! (org-export-backend-transcoders (org-export-get-backend 'hugo)) key value)
I only have one ox-hugo site, so mutating that map doesn't hurt in practice, but it feels wrong. I'd be in trouble if I also had a "vanilla" ox-hugo site. Is there a better way to extend a transcoder or two?
Beta Was this translation helpful? Give feedback.
All reactions