-
Notifications
You must be signed in to change notification settings - Fork 334
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
How to pass {{< highlight r >}} for pygments (instead of using highlight.js) #125
Comments
I have to confess that I'm opinionated on this issue. To me, syntax highlighting is more for decoration purposes. It is not essential, and not worth too much effort on improving the precision or granularity. I'm rarely conscious of which specific characters are colored or not, or what specific colors are used when I read source code. My mind is pretty much focused on the meaning of the code instead of cosmetics. On the other hand, I believe too much syntax highlighting is worse than no syntax highlighting at all. Personally I don't like using pygments in Hugo because the HTML source for
|
I hear you. I think you are right. I thought the flexibility was warranted in the beginning, but maybe not anymore. Especially putting the content inside the shortcode. I didn't have I think I'll roll with highlight.js for now. Thanks for the above. |
FYI I have added the
I'm not sure how compatible the Haskell library highlighting-kate is with Pygments. |
After being directed to the bookdown upon creating my first issue (the answer to my problem was sitting there quite obviously) I took my time looking around (Hugo forums, GitHub) however still lacking the solution for my syntax highlighting problem.
Basically, I want to use pygments to be able to manipulate class colors (with
pygmentsuseclasses = true
. However, I cannot seem to find where to pass Hugo's highlight function in blogdown. I have the library on the path.Highligth.js works fine with a customized .css, but syntax like operators, functions etc. do not span their own class. This post for example has the functionality I want (just inspect any code chunk), however it was built by Jekyll. He seems to pass {% highlight r %} before the code. How can I do that with blogdown? Thanks.
The text was updated successfully, but these errors were encountered: