Open ewollesen opened 1 year ago
I'm new to Elisp and ox-hugo, so apologies if I've done anything silly. I'll leave this as a draft for now while I go through all the contribution guidelines. However, if this isn't something you'd even be interested in, please let me know, so I don't waste my time with all the contribution hoop-jumping and what not. :)
Thanks for all your work, ox-hugo is great!
... oh, I'm off now to update my pandoc and write some tests.
I'm trying to run the tests, but they're failing in the Emacs version check. I believe this line is the indicator:
Debugger entered--Lisp error: (wrong-type-argument listp \(add-hook)
loaddefs-generate--parse-file("/tmp/ericw/ox-hugo-dev/elpa_29/biblio-core-2021041..." "/tmp/ericw/ox-hugo-dev/elpa_29/biblio-core-2021041..." nil)
Grepping around, I found this:
/tmp/ericw/ox-hugo-dev/elpa_29/biblio-core-20210418.406/biblio-core.el
834-
835-;;;###autoload
836:3:\(add-hook \\='biblio-init-hook \\='YOUR-BACKEND-HERE).")
837-
I uhhh, don't really understand Elisp well enough to know what's going on there, but even if I did, I don't think I'd know how to fix whatever's wrong, since this seems to be a dependency.
Do you have any pointers for how I might work around this problem? I guess I'll comment out the emacs version check for now.
Hello, I cannot take a close look at this as I am on vacation. I'll be able to take a better look after October second week.
While you are working on this, also make sure sure that C-c C-e H H
behaves as expected when the point is in each of the subtrees: A, B and C.
C-c C-e H A
should also behave as expected: export 2 posts from your example.
If it results in complicating the existing code, I'd prefer to keep the simplicity of the current design rule: "A subtree with EXPORT_FILE_NAME cannot nest other post subtrees."
Hello @ewollesen , I have given some thought to this. I really like the simplicity of the rule that a subtree with EXPORT_FILE_NAME
property needs to be the top-level for a post, and it cannot nest other EXPORT_FILE_NAME
property sub-trees.
Can you please post a real example or point to one where you find the need to do so?
Previously, when a heading was rendered, each of its subheadings' output was included in the output. With this change, a customizable variable is added that, if set, will omit those subheadings that have the :EXPORT_FILE_NAME property set from the output of their parent.
This can be handy for non-blogging sites, where the content is still hierarchical, but doesn't lend itself to the blogging format where a parent page includes the content of each of its children (like a year index page, month index page, etc.)
At the rist of being annoyingly verbose, before this change, if you had a post structure like this (in pseudo-org-mode format):
When rendered into HTML at the URL of /posts/post-a/, one would see:
After this change (and when the variable is set):
The premise is that Post B will have its own page (as indicated by the :EXPORT_FILE_NAME property) and so doesn't or shouldn't be included in the content of Post A.