* Question Regarding Exporting A Single 'blog.org' File With Subheadings To Multiple Separate Markdown Files
@ 2022-06-13 14:44 Samuel Banya
2022-06-13 14:57 ` Kaushal Modi
0 siblings, 1 reply; 4+ messages in thread
From: Samuel Banya @ 2022-06-13 14:44 UTC (permalink / raw)
To: Emanuel Berg
Hello,
I am converting my blog to utilize 'ox-hugo' so that I can convert my single 'blog.org' file with multiple headings that each have a date for the heading name into their own separate Markdown files.
Ex for contents of 'blog.org'
```
* June 13, 2022
Something that I did today
```
When I go to export this, I hit C-c C-e, and then hit 'H' (Export to Hugo-compatible markdown) and then 'A' (All subtrees (or File) to Md file(s)'.
The end result however is just a single 'blog.md' file with all of the individual posts.
Am I doing something wrong within this workflow?
Or do I have to actually place all of these individual posts into their own .org files accordingly?
My config for reference is here:
https://github.com/SamuelBanya/SamsEmacs/blob/main/configuration.org
Thanks,
Sam
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Question Regarding Exporting A Single 'blog.org' File With Subheadings To Multiple Separate Markdown Files
2022-06-13 14:44 Question Regarding Exporting A Single 'blog.org' File With Subheadings To Multiple Separate Markdown Files Samuel Banya
@ 2022-06-13 14:57 ` Kaushal Modi
2022-06-13 17:00 ` Samuel Banya
0 siblings, 1 reply; 4+ messages in thread
From: Kaushal Modi @ 2022-06-13 14:57 UTC (permalink / raw)
To: Samuel Banya; +Cc: Emanuel Berg
On Mon, Jun 13, 2022 at 10:48 AM Samuel Banya <sbanya@fastmail.com> wrote:
>
> Hello,
>
> I am converting my blog to utilize 'ox-hugo' so that I can convert my single 'blog.org' file with multiple headings that each have a date for the heading name into their own separate Markdown files.
> Am I doing something wrong within this workflow?
If you are following the "subtree based export flow", you will need to
add the EXPORT_FILE_NAME property for each subtree you want to export
as a post. See this minimal example in the ox-hugo Quick Start guide:
https://ox-hugo.scripter.co/doc/quick-start/#code-snippet--basic-post-in-org
Also see these:
https://ox-hugo.scripter.co/#before-you-export
> If you choose to export an Org subtree as a post, you need to set the EXPORT_FILE_NAME subtree property. That property is used by this package to figure out where the current post starts.
https://ox-hugo.scripter.co/doc/usage/#for-both-one-post-per-subtree-and-one-post-per-file-flows:
> A valid Hugo post subtree is an Org subtree that has the EXPORT_FILE_NAME property set. Note that a subtree with EXPORT_FILE_NAME property cannot nest a subtree with the same property set.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Question Regarding Exporting A Single 'blog.org' File With Subheadings To Multiple Separate Markdown Files
2022-06-13 14:57 ` Kaushal Modi
@ 2022-06-13 17:00 ` Samuel Banya
2022-06-13 17:12 ` Kaushal Modi
0 siblings, 1 reply; 4+ messages in thread
From: Samuel Banya @ 2022-06-13 17:00 UTC (permalink / raw)
To: Kaushal Modi; +Cc: Emanuel Berg
Awesome thanks for this reference.
I wonder, would it make sense to name them in such a way that they could be ordered, or is Hugo smart enough to just pick up the latest posts based on export date?
Either way, thanks for leading me in the right direction, great reference.
Sincerely,
Sam
On Mon, Jun 13, 2022, at 10:57 AM, Kaushal Modi wrote:
> On Mon, Jun 13, 2022 at 10:48 AM Samuel Banya <sbanya@fastmail.com> wrote:
> >
> > Hello,
> >
> > I am converting my blog to utilize 'ox-hugo' so that I can convert my single 'blog.org' file with multiple headings that each have a date for the heading name into their own separate Markdown files.
> > Am I doing something wrong within this workflow?
>
> If you are following the "subtree based export flow", you will need to
> add the EXPORT_FILE_NAME property for each subtree you want to export
> as a post. See this minimal example in the ox-hugo Quick Start guide:
> https://ox-hugo.scripter.co/doc/quick-start/#code-snippet--basic-post-in-org
>
> Also see these:
>
> https://ox-hugo.scripter.co/#before-you-export
> > If you choose to export an Org subtree as a post, you need to set the EXPORT_FILE_NAME subtree property. That property is used by this package to figure out where the current post starts.
>
> https://ox-hugo.scripter.co/doc/usage/#for-both-one-post-per-subtree-and-one-post-per-file-flows:
> > A valid Hugo post subtree is an Org subtree that has the EXPORT_FILE_NAME property set. Note that a subtree with EXPORT_FILE_NAME property cannot nest a subtree with the same property set.
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Question Regarding Exporting A Single 'blog.org' File With Subheadings To Multiple Separate Markdown Files
2022-06-13 17:00 ` Samuel Banya
@ 2022-06-13 17:12 ` Kaushal Modi
0 siblings, 0 replies; 4+ messages in thread
From: Kaushal Modi @ 2022-06-13 17:12 UTC (permalink / raw)
To: Samuel Banya; +Cc: Emanuel Berg
On Mon, Jun 13, 2022 at 1:00 PM Samuel Banya <sbanya@fastmail.com> wrote:
>
> Awesome thanks for this reference.
You're welcome! :)
> I wonder, would it make sense to name them in such a way that they could be ordered, or is Hugo smart enough to just pick up the latest posts based on export date?
I believe Hugo orders the posts by date by default (newest posts first).
But of course, Hugo gives you a lot of control and you can tweak how
to can order your posts in your Hugo templates. See
https://gohugo.io/templates/lists/#order-content.
The Hugo templating discussion would fall out of the scope of this
list. I would suggest taking Hugo templating questions to
https://discourse.gohugo.io/. I learned a lot from that forum.
As for ox-hugo questions, feel free to open a discussion on
https://github.com/kaushalmodi/ox-hugo/discussions.
Good luck!
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-06-13 17:12 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-06-13 14:44 Question Regarding Exporting A Single 'blog.org' File With Subheadings To Multiple Separate Markdown Files Samuel Banya
2022-06-13 14:57 ` Kaushal Modi
2022-06-13 17:00 ` Samuel Banya
2022-06-13 17:12 ` Kaushal Modi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).