Closed yefeiyu closed 4 years ago
Good catch. Indeed. It might be because the toc generation is done after the org-publish step.
Hummm. This may also mean that the yaml header generation should take place after the toc generation... If those assertions are correct, the implementation should change as well.
Hint: Using org-publish-after-publishing-hook
to trigger the yaml header generation?
This could simplify the current implementation which manipulates an org-mode buffer copy to add the yaml and then publishes the org-mode file.
I am depressed for what I couldn't find the hook of org-publish-after-...
, and didn't know how to use them.
Will You fix it in some day?
Yes, i intend to. I tagged it as a bug for that purpose.
The hint (hook) was for me as a reminder and as a possible implementation improvment. But this is all theoretical for now.
Cheers, On Sun, May 1, 2016, 3:03 PM yefeiyu notifications@github.com wrote:
I am depressed for what I couldn't find the hook of org-publish-after-..., and didn't know how to use them. Will You fix it in some day?
— You are receiving this because you commented.
Reply to this email directly or view it on GitHub https://github.com/ardumont/org2jekyll/issues/38#issuecomment-216040765
Also, I found the emacs' doc about hooks quite good to explain what those are. Also they present some examples on how to use them.
The doc on my emacs about the hook i mentioned:
org-publish-after-publishing-hook is a variable defined in `ox-publish.el'.
Its value is nil
This variable may be risky if used as a file-local variable.
Documentation:
Hook run each time a file is published.
Every function in this hook will be called with two arguments:
the name of the original file and the name of the file
produced.
When shall we soluted this bug? :-)
@yefeiyu I think #29 and this one are the same.
The fact that org-toc works tends to validate the hypothesis about the generation time. org-toc does generate the toc in org-mode, so prior to any publishing step.
As for the time to fix it... Right now, i just don't have any. And this is not, a priori, a small fix.
Any help is appreciated though.
Cheers,
I finally fixed that behavior. And having the toc generated alongside the post (without any external tool) is awesome.
So thanks for the report.
This got released in 0.2.2.
Thanks to your report, we now should be even more able to respect the user's org-mode setup options.
As it's been open for long, i don't really expect feedback on this one. So I'll just close it.
Feel free to reopen though if the issue remains.
Cheers,
1, I open the
toc:nil
totoc:t
in#+OPTIONS: H:2 num:t tags:nil toc:t timestamps:t
. 2, org2jekyll-publish 3, The result of the file**.html
's head is wrong . Please help me fix it, thank you