org-minimal-html-theme icon indicating copy to clipboard operation
org-minimal-html-theme copied to clipboard

You may have blocks of code syntax highlighting?

Open tanrax opened this issue 9 years ago • 4 comments

I said above :)

tanrax avatar Aug 06 '16 19:08 tanrax

@tanrax as of right now, there's no support, but I have something in the works. Keeping this issue opened and will update it when I'm done.

caffo avatar Aug 08 '16 13:08 caffo

thanks!

tanrax avatar Aug 08 '16 13:08 tanrax

@tanrax, I don't think I will have free time to actually implement this in the next few weeks. Anyway I come up with a way to implement it for you. Just replace the contents of your .setup file with this:

#+HTML_HEAD: <link rel="stylesheet" type="text/css" href="http://orgminimal.tizi.moe/bundle.min.css"/>
#+HTML_HEAD: <script src="http://orgminimal.tizi.moe/bundle.min.js" type="text/javascript" ></script>
#+HTML_HEAD: <script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.6.0/highlight.min.js"></script>
#+HTML_HEAD: <link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.6.0/styles/default.min.css">
#+HTML_HEAD: <script>
#+HTML_HEAD: document.addEventListener("DOMContentLoaded", function(event) {
#+HTML_HEAD: var blocks = document.getElementsByTagName('pre')
#+HTML_HEAD: for (index = 0; index < blocks.length; ++index) {
#+HTML_HEAD:   hljs.highlightBlock(blocks[index])
#+HTML_HEAD:   console.log(blocks[index]);
#+HTML_HEAD: }
#+HTML_HEAD: });
#+HTML_HEAD: </script>

Let me know if you have questions.

caffo avatar Aug 15 '16 18:08 caffo

Why just not use htmlize package? We already have default syntax-highlight with that on export. I have another problem with this is because the blocks of code is not dynamic, if I write a little long line it exceeds the block as here

ryukinix avatar Nov 12 '17 07:11 ryukinix