You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi folks,
First off, thanks so much for creating ox-hugo. I've been using it with my blog recently, and loving it.
In my blogging flow, all posts get created as bundles, e.g. in content/post/<blog_title>/index.md. I can achieve this with ox-hugo by setting the EXPORT_HUGO_BUNDLE property to <blog_title> and EXPORT_FILE_NAME to index.
But I often want to export my post in multiple formats, not just Hugo. I often also export as a LaTeX doc. For that my EXPORT_FILE_NAME needs to be export/<blog_title>. Then when I export as pdf, it get saved as export/<blog_title>.pdf. But then when I export via ox-hugo, it gets saved as content/post/<blog_title>/<blog_title>.md, which isn't what I want. Hugo (or at least, the academic theme I use), doesn't seem to recognize anything other than index.md, so the file seemingly has to be index.md.
I have a kludgey work-around: I know enough elisp to have manually edited org-hugo-export-to-md to ignore EXPORT_FILE_NAME and just hard-code to index.md. I replaced the line: (outfile (org-export-output-file-name ".md" subtreep pub-dir)))
And that seems to do it for me. But obviously not everyone wants to do that. So my request/suggestion is to enable the user to always export as index.md (perhaps only when EXPORT_HUGO_BUNDLE is specified), ignoring EXPORT_FILE_NAME.
Thanks again folks!
The text was updated successfully, but these errors were encountered:
Hi folks,
First off, thanks so much for creating ox-hugo. I've been using it with my blog recently, and loving it.
In my blogging flow, all posts get created as bundles, e.g. in
content/post/<blog_title>/index.md
. I can achieve this with ox-hugo by setting the EXPORT_HUGO_BUNDLE property to <blog_title> and EXPORT_FILE_NAME to index.But I often want to export my post in multiple formats, not just Hugo. I often also export as a LaTeX doc. For that my EXPORT_FILE_NAME needs to be
export/<blog_title>
. Then when I export as pdf, it get saved asexport/<blog_title>.pdf
. But then when I export via ox-hugo, it gets saved ascontent/post/<blog_title>/<blog_title>.md
, which isn't what I want. Hugo (or at least, the academic theme I use), doesn't seem to recognize anything other than index.md, so the file seemingly has to be index.md.I have a kludgey work-around: I know enough elisp to have manually edited org-hugo-export-to-md to ignore EXPORT_FILE_NAME and just hard-code to index.md. I replaced the line:
(outfile (org-export-output-file-name ".md" subtreep pub-dir)))
with:
(outfile (concat (file-name-as-directory pub-dir) "index.md")))
And that seems to do it for me. But obviously not everyone wants to do that. So my request/suggestion is to enable the user to always export as index.md (perhaps only when EXPORT_HUGO_BUNDLE is specified), ignoring EXPORT_FILE_NAME.
Thanks again folks!
The text was updated successfully, but these errors were encountered: