-
-
Notifications
You must be signed in to change notification settings - Fork 96
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
better exporting of #+BEGIN_SOURCE blocks #110
Comments
Thanks for the link. However, org-page does not use org-mode's code block rendering(insert so many ugly tags), instead, org-page will export code blocks in plain text, and then render these blocks with prettify.js. |
Uh, that wasn't the case for me with org-page until I integrated the code I'm linking |
Could you please paste a link here to the generated html source by that code snippet? |
I viewed the source, the code below is generated by org-page:
the code below is generated by the snippet you mentioned:
Seems the only difference is the extra BTW, your site's theme is really nice. :-) |
Well, yeah, that and some matching names since
haha, Thank you! I'm learning web design! Pax et bonum. |
Currently org-page uses prettify.js to render code blocks, and the However, you can keep that code snippet for your own generation. :-) |
There is one benefit: when the code is more width than the area where it is wrapped, a scroll bar is offered by the web browsers. This is critical for responsive design! El 21 de marzo de 2015 10:35:53 CST, Kelvin Hu notifications@github.com escribió:
Enviado desde mi teléfono con K-9 Mail. |
Isn't the scroll bar controlled by CSS? |
If you only use the tag, no, no scroll bar is shown |
One additional problem is that prettify.js does not seem to support |
I find two related issues at prettify.js' repo: |
Thanks. Exporting emacs lisp as lisp and adding I'm not sure how big the differences between lisp and emacs-lisp are and if this could be a source of problems. |
Hi! My solution was reduce $(document).ready(function() {
$('pre').each(function(i, block) {
var self = $(this);
self.removeAttr('class');
self.html('<code>' + self.html() + '</code>');
hljs.highlightBlock(block);
});
}); This code:
And now highlightjs works for In time: Kelvin Hu thank you so much for org-page. |
org-mode makes silly things for rendering code block when exporting to HTML. The thing is I made some questions at emacs stackexchange, and a very loving and kind developer pasted his code, all necesary elisp code, to export such code blocks as
<pre><code>
tags and compatible with highlight.jsHere is his answer with complete code snippets.
Hence, I was thinking that this project would make a good use of such code snippets if they were integrated. I already enjoy the benefits of such change, as for instance: the exported source blocks are responsive-design friendly.
The text was updated successfully, but these errors were encountered: