Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use org-mode propery inheritance to organize hugo exort #90

Closed
simonthum opened this issue Oct 28, 2017 · 11 comments
Closed

Use org-mode propery inheritance to organize hugo exort #90

simonthum opened this issue Oct 28, 2017 · 11 comments

Comments

@simonthum
Copy link

The subtree export would become more versatile when property inheritance could be used to modify some ox-hugo properties.

In particular, I find the property HUGO_SECTION would be great to set on a parent heading, e.g. for projects and posts in one Org mode file.

http://orgmode.org/manual/Property-inheritance.html

@kaushalmodi
Copy link
Owner

Ah, I now get it. You are probably just missing the EXPORT_ prefix. I happen to have this test that uses EXPORT_HUGO_SECTION inheritance: https://raw.githubusercontent.com/kaushalmodi/ox-hugo/master/test/site/content-org/deep-nesting.org

Here's the Hugo rendered output of that test: https://ox-hugo.scripter.co/test/book1

@kaushalmodi
Copy link
Owner

Almost all EXPORT_HUGO_* properties are auto-inherited.

@kaushalmodi
Copy link
Owner

Search for "EXPORT_" on http://orgmode.org/manual/Export-settings.html to learn why this is so.

@simonthum
Copy link
Author

OK, I knew I was missing something stupid... Thanks!

@simonthum
Copy link
Author

While I was indeed doing something stupid, the feature does not work as I would expect. EXPORT_HUGO_SECTION is only in effect when the immediately enclosing header defines it. When I have a level of indirection, it falls back to "posts". AFAICT deep-nesting.org only tests the immediate case.

@simonthum simonthum reopened this Oct 29, 2017
@kaushalmodi
Copy link
Owner

Hmm, can you paste a minimal test case here?

@simonthum
Copy link
Author

Roughly like this:

* Blog
 :EXPORT_HUGO_SECTION: blog
** Test 1
 :EXPORT_FILE_NAME: test
 lands in blog
** category        :@cat:
*** test2
:EXPORT_FILE_NAME: test2
lands in posts
* Projects

@kaushalmodi
Copy link
Owner

Thanks, I confirm that. I'll look into it tomorrow.

@kaushalmodi
Copy link
Owner

This issue auto-closed as I linked it with that fixing commit. But feel free to reopen this issue if it's still not fixed for you. Thanks for your bug reports! :)

@kaushalmodi
Copy link
Owner

Here's the test:

@simonthum
Copy link
Author

Well, thanks for making a package worth making bug reports for ;)

Jokes aside, this seems the most convincing org model blogging package to me due to the subtree export, which is the best I have seen so far. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants