Closed peng051410 closed 1 year ago
How does hugo export work? If it has a pre-processor, it should be possible to temporarily remove the read-only property of the transcluded text.
I only found org-hugo-auto-export-hook
, if there is an export hook, what next do?
I only found
org-hugo-auto-export-hook
, if there is an export hook, what next do?↳
I found can temporarily solve by this:
(add-hook 'org-hugo-auto-export-mode-on-hook (lambda() (when (org-transclusion-within-transclusion-p) (org-transclusion-inhibit-read-only t))))
Is this right?
When you activate org-transclusion-mode
, this hook is added and should enable org-export
in general; at least that is the intention.
(add-hook 'org-export-before-processing-hook
#'org-transclusion-inhibit-read-only nil t)
Apparently, this is not the case for ox-hugo
.
I don't use Hugo or ox-hugo
so I cannot test your suggestion. But if org-hugo-auto-export-mode-on-hook
works in the same way as org-export-before-processing-hook
does, then I'd try the following:
(add-hook 'org-hugo-auto-export-mode-on-hook
#'org-transclusion-inhibit-read-only nil t)
Copy. Thanks!
When you activate
org-transclusion-mode
, this hook is added and should enableorg-export
in general; at least that is the intention.↳(add-hook 'org-export-before-processing-hook #'org-transclusion-inhibit-read-only nil t)
Apparently, this is not the case for
ox-hugo
.↳I don't use Hugo or
ox-hugo
so I cannot test your suggestion. But iforg-hugo-auto-export-mode-on-hook
works in the same way asorg-export-before-processing-hook
does, then I'd try the following:↳(add-hook 'org-hugo-auto-export-mode-on-hook #'org-transclusion-inhibit-read-only nil t)
Hi: I have a buy for this package, can it be with ox-hugo package peaceful? now i found when i add org-transclusion item to hugo org file, and run
org-hugo-export-to-md
, message "text is read-only” raised . how can i handle this?