Closed vonpupp closed 2 years ago
Ox-hugo is already exporting class names for the states. But Hugo is removing the raw HTML. So you need to stop Hugo from doing that by putting this in your site config: https://ox-hugo.scripter.co/doc/goldmark/#enable-unsafe-html .
Thank you very much!
Do you have any suggestion on how to render org-mode tags also (mapped if possible as hugo tags from metadata)?
I don't quite follow. Exporting Org tags is the most basic feature of this exporter. But as Org tags are attached to a heading, you need to use the subtree based flow.
You can see the examples in these screenshots on how tags are exported using file based vs subtree based flows.
Also see the docs on front matter exports: https://ox-hugo.scripter.co/doc/org-meta-data-to-hugo-front-matter/
Thank you for your time and answer.
My question was poorly asked, I apologize. Let me try to explain myself better this time. The context of my question is within file based exports (not subtrees). Imagine the following example:
* Write your own standard library
** TODO it's nice to use some nonstandard but convenient library, and later vendorize/hardcode/get rid of imported bits :kython:motivation:
If you check the example here, you can see that org-mode header tags are mapped as anchors to the hugo tags. I would like to achieve something similar however I am unsure if this is related to ox-hugo, hugo itself or even the theme.
Thank you very much.
Thanks for providing more details.
Yes, ox-hugo doesn't export the tags of sub headings. It doesn't always apply that tags for a subheading of a post should apply to the whole post.
So for file based flow, those tags need to go to #+hugo_tags keyword, while for subtree based flow, those tags go to only the primary heading containing the title of the post.
I am not convinced that sub heading tags should be exported as post tags. But I can certainly enable exporting those as part of the post body somehow. Can you suggest an example Markdown with the embedded HTML of how that would look?
In the example post you provided, I believe that the tags become part of the subheadings. Is that really how you'd like to do the exports too?
Thanks for your response.
I don't have an example in markdown, my suggestion was based on [this example]. Yes, on that example the tag becomes part of the subheading, which for me, it makes sense since it is exactly what happens in org-mode.
Apparently what he has works as follows: the anchor on the heading tags links to the "all tags" page when the tag does not exists, or to the tag itself when it does exists. Maybe this could be a nice feature. I don't know if there are boolean option switches on ox-hugo, but if there is maybe this could be a feature that could be turned off by default and turned on if someone needs it.
@vonpupp Here's a super-late reply.
To your original comment:
If you check the example here, you can see that org-mode header tags are mapped as anchors to the hugo tags. I would like to achieve something similar however I am unsure if this is related to ox-hugo, hugo itself or even the theme.
I don't know why I didn't think of this when replying, but what you want should be actually done in your Hugo theme and it's very much possible because your tags are being exported in the front-matter that Hugo can use.
For example, I do something like that already on my own site:
If you are interested, my theme is here.
At the end of the day, ox-hugo
's job is to just export the content that Hugo can parse. Then the "looks" and presentation of that content is left to Hugo themes.
Closing this issue. Please feel free to comment further in this thread.
Hello,
I am using files instead of sub-trees and I would like to be able to be able to export features of org-mode as states so I can apply custom CSS. In fact it would be awesome if the rendering could be something like this post.
Actual Behavior
I cannot get the output as this post.
Expected Behavior
this post type of output
How to Reproduce the Issue
Example Org File
I get the source code of the html as follows:
Generated Markdown File or Error
Desired output
In fact it would be awesome if also tags and the other org goodies could be exported also. Please check this post as an example.
Ox-Hugo Debug Information
Debug Info
# Debug information for `ox-hugo` ## Emacs Version GNU Emacs 26.3 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.20) of 2020-05-19 ## Org Version Org mode version 9.3.7 (9.3.7-15-gc9abb4-elpaplus @ /home/av/.emacs.d/elpa/26.3/develop/org-plus-contrib-20200727/) ## Hugo Version ]4;0;rgb:27/28/22\]4;1;rgb:f9/26/72\]4;2;rgb:a6/e2/2e\]4;3;rgb:f4/bf/75\]4;4;rgb:66/d9/ef\]4;5;rgb:ae/81/ff\]4;6;rgb:a1/ef/e4\]4;7;rgb:f8/f8/f2\]4;8;rgb:75/71/5e\]4;9;rgb:f9/26/72\]4;10;rgb:a6/e2/2e\]4;11;rgb:f4/bf/75\]4;12;rgb:66/d9/ef\]4;13;rgb:ae/81/ff\]4;14;rgb:a1/ef/e4\]4;15;rgb:f9/f8/f5\]4;16;rgb:fd/97/1f\]4;17;rgb:cc/66/33\]4;18;rgb:38/38/30\]4;19;rgb:49/48/3e\]4;20;rgb:a5/9f/85\]4;21;rgb:f5/f4/f1\]10;rgb:f8/f8/f2\]11;rgb:27/28/22\]12;7\Hugo Static Site Generator v0.74.0/extended linux/amd64 BuildDate: unknown ### Org `load-path` shadows **Warning**: Possible mixed installation of Org /home/av/.emacs.d/elpa/26.3/develop/org-plus-contrib-20200727/org-id hides /usr/share/emacs/26.3/lisp/org/org-id /home/av/.emacs.d/elpa/26.3/develop/org-plus-contrib-20200727/ob-makefile hides /usr/share/emacs/26.3/lisp/org/ob-makefile /home/av/.emacs.d/elpa/26.3/develop/org-plus-contrib-20200727/ox-man hides /usr/share/emacs/26.3/lisp/org/ox-man /home/av/.emacs.d/elpa/26.3/develop/org-plus-contrib-20200727/ob-sed hides /usr/share/emacs/26.3/lisp/org/ob-sed /home/av/.emacs.d/elpa/26.3/develop/org-plus-contrib-20200727/ob-R hides /usr/share/emacs/26.3/lisp/org/ob-R /home/av/.emacs.d/elpa/26.3/develop/org-plus-contrib-20200727/ob-gnuplot hides /usr/share/emacs/26.3/lisp/org/ob-gnuplot /home/av/.emacs.d/elpa/26.3/develop/org-plus-contrib-20200727/org-compat hides /usr/share/emacs/26.3/lisp/org/org-compat /home/av/.emacs.d/elpa/26.3/develop/org-plus-contrib-20200727/ox-icalendar hides /usr/share/emacs/26.3/lisp/org/ox-icalendar /home/av/.emacs.d/elpa/26.3/develop/org-plus-contrib-20200727/ob-org hides /usr/share/emacs/26.3/lisp/org/ob-org /home/av/.emacs.d/elpa/26.3/develop/org-plus-contrib-20200727/ob-lua hides /usr/share/emacs/26.3/lisp/org/ob-lua /home/av/.emacs.d/elpa/26.3/develop/org-plus-contrib-20200727/ob-coq hides /usr/share/emacs/26.3/lisp/org/ob-coq /home/av/.emacs.d/elpa/26.3/develop/org-plus-contrib-20200727/org-clock hides /usr/share/emacs/26.3/lisp/org/org-clock /home/av/.emacs.d/elpa/26.3/develop/org-plus-contrib-20200727/ob-perl hides /usr/share/emacs/26.3/lisp/org/ob-perl /home/av/.emacs.d/elpa/26.3/develop/org-plus-contrib-20200727/ob-stan hides /usr/share/emacs/26.3/lisp/org/ob-stan /home/av/.emacs.d/elpa/26.3/develop/org-plus-contrib-20200727/ob-core hides /usr/share/emacs/26.3/lisp/org/ob-core /home/av/.emacs.d/elpa/26.3/develop/org-plus-contrib-20200727/ob-dot hides /usr/share/emacs/26.3/lisp/org/ob-dot /home/av/.emacs.d/elpa/26.3/develop/org-plus-contrib-20200727/ob-io hides /usr/share/emacs/26.3/lisp/org/ob-io /home/av/.emacs.d/elpa/26.3/develop/org-plus-contrib-20200727/org-mobile hides /usr/share/emacs/26.3/lisp/org/org-mobile /home/av/.emacs.d/elpa/26.3/develop/org-plus-contrib-20200727/ox-texinfo hides /usr/share/emacs/26.3/lisp/org/ox-texinfo /home/av/.emacs.d/elpa/26.3/develop/org-plus-contrib-20200727/ox-html hides /usr/share/emacs/26.3/lisp/org/ox-html /home/av/.emacs.d/elpa/26.3/develop/org-plus-contrib-20200727/org-protocol hides /usr/share/emacs/26.3/lisp/org/org-protocol /home/av/.emacs.d/elpa/26.3/develop/org-plus-contrib-20200727/ox-latex hides /usr/share/emacs/26.3/lisp/org/ox-latex /home/av/.emacs.d/elpa/26.3/develop/org-plus-contrib-20200727/ob-lob hides /usr/share/emacs/26.3/lisp/org/ob-lob /home/av/.emacs.d/elpa/26.3/develop/org-plus-contrib-20200727/ox-beamer hides /usr/share/emacs/26.3/lisp/org/ox-beamer /home/av/.emacs.d/elpa/26.3/develop/org-plus-contrib-20200727/org-datetree hides /usr/share/emacs/26.3/lisp/org/org-datetree /home/av/.emacs.d/elpa/26.3/develop/org-plus-contrib-20200727/org-footnote hides /usr/share/emacs/26.3/lisp/org/org-footnote /home/av/.emacs.d/elpa/26.3/develop/org-plus-contrib-20200727/ob-ref hides /usr/share/emacs/26.3/lisp/org/ob-ref /home/av/.emacs.d/elpa/26.3/develop/org-plus-contrib-20200727/ob-calc hides /usr/share/emacs/26.3/lisp/org/ob-calc /home/av/.emacs.d/elpa/26.3/develop/org-plus-contrib-20200727/org-crypt hides /usr/share/emacs/26.3/lisp/org/org-crypt /home/av/.emacs.d/elpa/26.3/develop/org-plus-contrib-20200727/ob-java hides /usr/share/emacs/26.3/lisp/org/ob-java /home/av/.emacs.d/elpa/26.3/develop/org-plus-contrib-20200727/ob-lisp hides /usr/share/emacs/26.3/lisp/org/ob-lisp /home/av/.emacs.d/elpa/26.3/develop/org-plus-contrib-20200727/org-element hides /usr/share/emacs/26.3/lisp/org/org-element /home/av/.emacs.d/elpa/26.3/develop/org-plus-contrib-20200727/org-faces hides /usr/share/emacs/26.3/lisp/org/org-faces /home/av/.emacs.d/elpa/26.3/develop/org-plus-contrib-20200727/org-inlinetask hides /usr/share/emacs/26.3/lisp/org/org-inlinetask /home/av/.emacs.d/elpa/26.3/develop/org-plus-contrib-20200727/org-pcomplete hides /usr/share/emacs/26.3/lisp/org/org-pcomplete /home/av/.emacs.d/elpa/26.3/develop/org-plus-contrib-20200727/org-timer hides /usr/share/emacs/26.3/lisp/org/org-timer /home/av/.emacs.d/elpa/26.3/develop/org-plus-contrib-20200727/org-ctags hides /usr/share/emacs/26.3/lisp/org/org-ctags /home/av/.emacs.d/elpa/26.3/develop/org-plus-contrib-20200727/ob-groovy hides /usr/share/emacs/26.3/lisp/org/ob-groovy /home/av/.emacs.d/elpa/26.3/develop/org-plus-contrib-20200727/ob-lilypond hides /usr/share/emacs/26.3/lisp/org/ob-lilypond /home/av/.emacs.d/elpa/26.3/develop/org-plus-contrib-20200727/org-attach hides /usr/share/emacs/26.3/lisp/org/org-attach /home/av/.emacs.d/elpa/26.3/develop/org-plus-contrib-20200727/ob-maxima hides /usr/share/emacs/26.3/lisp/org/ob-maxima /home/av/.emacs.d/elpa/26.3/develop/org-plus-contrib-20200727/ob-emacs-lisp hides /usr/share/emacs/26.3/lisp/org/ob-emacs-lisp /home/av/.emacs.d/elpa/26.3/develop/org-plus-contrib-20200727/org-agenda hides /usr/share/emacs/26.3/lisp/org/org-agenda /home/av/.emacs.d/elpa/26.3/develop/org-plus-contrib-20200727/org-duration hides /usr/share/emacs/26.3/lisp/org/org-duration /home/av/.emacs.d/elpa/26.3/develop/org-plus-contrib-20200727/ob-table hides /usr/share/emacs/26.3/lisp/org/ob-table /home/av/.emacs.d/elpa/26.3/develop/org-plus-contrib-20200727/ob-matlab hides /usr/share/emacs/26.3/lisp/org/ob-matlab /home/av/.emacs.d/elpa/26.3/develop/org-plus-contrib-20200727/ob-tangle hides /usr/share/emacs/26.3/lisp/org/ob-tangle /home/av/.emacs.d/elpa/26.3/develop/org-plus-contrib-20200727/ob-octave hides /usr/share/emacs/26.3/lisp/org/ob-octave /home/av/.emacs.d/elpa/26.3/develop/org-plus-contrib-20200727/ob-shell hides /usr/share/emacs/26.3/lisp/org/ob-shell /home/av/.emacs.d/elpa/26.3/develop/org-plus-contrib-20200727/org-macro hides /usr/share/emacs/26.3/lisp/org/org-macro /home/av/.emacs.d/elpa/26.3/develop/org-plus-contrib-20200727/org-version hides /usr/share/emacs/26.3/lisp/org/org-version /home/av/.emacs.d/elpa/26.3/develop/org-plus-contrib-20200727/ox-ascii hides /usr/share/emacs/26.3/lisp/org/ox-ascii /home/av/.emacs.d/elpa/26.3/develop/org-plus-contrib-20200727/ob-mscgen hides /usr/share/emacs/26.3/lisp/org/ob-mscgen /home/av/.emacs.d/elpa/26.3/develop/org-plus-contrib-20200727/ob-ebnf hides /usr/share/emacs/26.3/lisp/org/ob-ebnf /home/av/.emacs.d/elpa/26.3/develop/org-plus-contrib-20200727/ob-picolisp hides /usr/share/emacs/26.3/lisp/org/ob-picolisp /home/av/.emacs.d/elpa/26.3/develop/org-plus-contrib-20200727/ob-js hides /usr/share/emacs/26.3/lisp/org/ob-js /home/av/.emacs.d/elpa/26.3/develop/org-plus-contrib-20200727/org-capture hides /usr/share/emacs/26.3/lisp/org/org-capture /home/av/.emacs.d/elpa/26.3/develop/org-plus-contrib-20200727/ob-python hides /usr/share/emacs/26.3/lisp/org/ob-python /home/av/.emacs.d/elpa/26.3/develop/org-plus-contrib-20200727/ob-shen hides /usr/share/emacs/26.3/lisp/org/ob-shen /home/av/.emacs.d/elpa/26.3/develop/org-plus-contrib-20200727/ob-forth hides /usr/share/emacs/26.3/lisp/org/ob-forth /home/av/.emacs.d/elpa/26.3/develop/org-plus-contrib-20200727/org-src hides /usr/share/emacs/26.3/lisp/org/org-src /home/av/.emacs.d/elpa/26.3/develop/org-plus-contrib-20200727/ob-screen hides /usr/share/emacs/26.3/lisp/org/ob-screen /home/av/.emacs.d/elpa/26.3/develop/org-plus-contrib-20200727/org-table hides /usr/share/emacs/26.3/lisp/org/org-table /home/av/.emacs.d/elpa/26.3/develop/org-plus-contrib-20200727/ox-publish hides /usr/share/emacs/26.3/lisp/org/ox-publish /home/av/.emacs.d/elpa/26.3/develop/org-plus-contrib-20200727/ob-processing hides /usr/share/emacs/26.3/lisp/org/ob-processing /home/av/.emacs.d/elpa/26.3/develop/org-plus-contrib-20200727/ob-hledger hides /usr/share/emacs/26.3/lisp/org/ob-hledger /home/av/.emacs.d/elpa/26.3/develop/org-plus-contrib-20200727/ob-scheme hides /usr/share/emacs/26.3/lisp/org/ob-scheme /home/av/.emacs.d/elpa/26.3/develop/org-plus-contrib-20200727/org-archive hides /usr/share/emacs/26.3/lisp/org/org-archive /home/av/.emacs.d/elpa/26.3/develop/org-plus-contrib-20200727/org-loaddefs hides /usr/share/emacs/26.3/lisp/org/org-loaddefs /home/av/.emacs.d/elpa/26.3/develop/org-plus-contrib-20200727/org-feed hides /usr/share/emacs/26.3/lisp/org/org-feed /home/av/.emacs.d/elpa/26.3/develop/org-plus-contrib-20200727/ox hides /usr/share/emacs/26.3/lisp/org/ox /home/av/.emacs.d/elpa/26.3/develop/org-plus-contrib-20200727/ob-css hides /usr/share/emacs/26.3/lisp/org/ob-css /home/av/.emacs.d/elpa/26.3/develop/org-plus-contrib-20200727/ob-plantuml hides /usr/share/emacs/26.3/lisp/org/ob-plantuml /home/av/.emacs.d/elpa/26.3/develop/org-plus-contrib-20200727/org hides /usr/share/emacs/26.3/lisp/org/org /home/av/.emacs.d/elpa/26.3/develop/org-plus-contrib-20200727/org-install hides /usr/share/emacs/26.3/lisp/org/org-install /home/av/.emacs.d/elpa/26.3/develop/org-plus-contrib-20200727/ob-sqlite hides /usr/share/emacs/26.3/lisp/org/ob-sqlite /home/av/.emacs.d/elpa/26.3/develop/org-plus-contrib-20200727/org-macs hides /usr/share/emacs/26.3/lisp/org/org-macs /home/av/.emacs.d/elpa/26.3/develop/org-plus-contrib-20200727/ob-haskell hides /usr/share/emacs/26.3/lisp/org/ob-haskell /home/av/.emacs.d/elpa/26.3/develop/org-plus-contrib-20200727/org-colview hides /usr/share/emacs/26.3/lisp/org/org-colview /home/av/.emacs.d/elpa/26.3/develop/org-plus-contrib-20200727/org-entities hides /usr/share/emacs/26.3/lisp/org/org-entities /home/av/.emacs.d/elpa/26.3/develop/org-plus-contrib-20200727/ob hides /usr/share/emacs/26.3/lisp/org/ob /home/av/.emacs.d/elpa/26.3/develop/org-plus-contrib-20200727/ob-awk hides /usr/share/emacs/26.3/lisp/org/ob-awk /home/av/.emacs.d/elpa/26.3/develop/org-plus-contrib-20200727/ob-ruby hides /usr/share/emacs/26.3/lisp/org/ob-ruby /home/av/.emacs.d/elpa/26.3/develop/org-plus-contrib-20200727/ob-sql hides /usr/share/emacs/26.3/lisp/org/ob-sql /home/av/.emacs.d/elpa/26.3/develop/org-plus-contrib-20200727/ob-comint hides /usr/share/emacs/26.3/lisp/org/ob-comint /home/av/.emacs.d/elpa/26.3/develop/org-plus-contrib-20200727/ox-odt hides /usr/share/emacs/26.3/lisp/org/ox-odt /home/av/.emacs.d/elpa/26.3/develop/org-plus-contrib-20200727/ob-eval hides /usr/share/emacs/26.3/lisp/org/ob-eval /home/av/.emacs.d/elpa/26.3/develop/org-plus-contrib-20200727/ob-asymptote hides /usr/share/emacs/26.3/lisp/org/ob-asymptote /home/av/.emacs.d/elpa/26.3/develop/org-plus-contrib-20200727/ob-clojure hides /usr/share/emacs/26.3/lisp/org/ob-clojure /home/av/.emacs.d/elpa/26.3/develop/org-plus-contrib-20200727/org-lint hides /usr/share/emacs/26.3/lisp/org/org-lint /home/av/.emacs.d/elpa/26.3/develop/org-plus-contrib-20200727/ob-J hides /usr/share/emacs/26.3/lisp/org/ob-J /home/av/.emacs.d/elpa/26.3/develop/org-plus-contrib-20200727/ob-ocaml hides /usr/share/emacs/26.3/lisp/org/ob-ocaml /home/av/.emacs.d/elpa/26.3/develop/org-plus-contrib-20200727/org-habit hides /usr/share/emacs/26.3/lisp/org/org-habit /home/av/.emacs.d/elpa/26.3/develop/org-plus-contrib-20200727/org-list hides /usr/share/emacs/26.3/lisp/org/org-list /home/av/.emacs.d/elpa/26.3/develop/org-plus-contrib-20200727/ob-vala hides /usr/share/emacs/26.3/lisp/org/ob-vala /home/av/.emacs.d/elpa/26.3/develop/org-plus-contrib-20200727/ob-abc hides /usr/share/emacs/26.3/lisp/org/ob-abc /home/av/.emacs.d/elpa/26.3/develop/org-plus-contrib-20200727/ob-fortran hides /usr/share/emacs/26.3/lisp/org/ob-fortran /home/av/.emacs.d/elpa/26.3/develop/org-plus-contrib-20200727/org-plot hides /usr/share/emacs/26.3/lisp/org/org-plot /home/av/.emacs.d/elpa/26.3/develop/org-plus-contrib-20200727/org-mouse hides /usr/share/emacs/26.3/lisp/org/org-mouse /home/av/.emacs.d/elpa/26.3/develop/org-plus-contrib-20200727/ob-latex hides /usr/share/emacs/26.3/lisp/org/ob-latex /home/av/.emacs.d/elpa/26.3/develop/org-plus-contrib-20200727/ox-org hides /usr/share/emacs/26.3/lisp/org/ox-org /home/av/.emacs.d/elpa/26.3/develop/org-plus-contrib-20200727/ob-exp hides /usr/share/emacs/26.3/lisp/org/ob-exp /home/av/.emacs.d/elpa/26.3/develop/org-plus-contrib-20200727/ob-ditaa hides /usr/share/emacs/26.3/lisp/org/ob-ditaa /home/av/.emacs.d/elpa/26.3/develop/org-plus-contrib-20200727/ob-sass hides /usr/share/emacs/26.3/lisp/org/ob-sass /home/av/.emacs.d/elpa/26.3/develop/org-plus-contrib-20200727/org-indent hides /usr/share/emacs/26.3/lisp/org/org-indent /home/av/.emacs.d/elpa/26.3/develop/org-plus-contrib-20200727/ob-ledger hides /usr/share/emacs/26.3/lisp/org/ob-ledger /home/av/.emacs.d/elpa/26.3/develop/org-plus-contrib-20200727/ob-C hides /usr/share/emacs/26.3/lisp/org/ob-C /home/av/.emacs.d/elpa/26.3/develop/org-plus-contrib-20200727/ox-md hides /usr/share/emacs/26.3/lisp/org/ox-md Study the output of `M-x list-load-path-shadows`. ## `ox-hugo` defcustoms