g-hanwen / hugo-theme-nostyleplease

a (nearly) no-CSS, fast, minimalist Hugo theme ported from riggraz/no-style-please.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Syntax Highlighting

underscoreHao opened this issue · comments

First I want to say thanks for the great theme! I must've tried at least 10 before finally stopping on this one! Much appreciated!

My only issue is that syntax highlighting doesn't really work as expected. I had a look through the code and if I use the default rrt from your example config.toml all is well, but trying other themes (I used the codes from here - https://xyproto.github.io/splash/docs/all.html) has unintended results. In the css file there are entries for code and pre tags, but I was under the impression that when noClasses = true then Hugo will handle the highlighting?

Sorry but the reason might be those hardcoded colors in the css files, which was a temporary hack. I will try to improve it asap.

I'll be happy to help with that (testing, dev etc)! I've noticed that on your own website there are also weird artifacts in some of the code samples you've shown which is very curious since they don't show always!

For example in your number theory post:
image

But then underneath in another example it's all fine:
image

Maybe it's because of tabs/spaces in the upper example? 🤔

However, I do believe that the code class being set to black is a very good stylistic choice to use instead of bold, like in here (a post of mine):

image

I use the backticks instead of bold in a lot of the markdown texts I type. I believe it serves the reader better than plain bold.

I can create a class of my own for this type of bolding, so don't feel obliged to change the whole theme for it. I just wanted to bring this to your attention that it looks good!

Sorry for the late response. Fixed this in this commit.