Skip to content
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

Docsy SCSS overriding Hugo 0.60+ highlight style #214

Closed
kmuncie opened this issue Feb 23, 2020 · 10 comments · Fixed by #312
Closed

Docsy SCSS overriding Hugo 0.60+ highlight style #214

kmuncie opened this issue Feb 23, 2020 · 10 comments · Fixed by #312

Comments

@kmuncie
Copy link

kmuncie commented Feb 23, 2020

The background colors set below seem to be overriding the native Hugo highlight styles after upgrading to Hugo 0.60+

This is especially noticeable with the darker code style themes such as the default theme of monokai as seen below:

docsy-highlight-bug

Thank you for your time looking at this.

@LisaFC
Copy link
Collaborator

LisaFC commented Feb 25, 2020

Thanks for spotting that, I'll take a look.

@frodriguezsmartclip
Copy link

@kmuncie yeah, therefore I've configured the Prism.JS to highlight code in my custom theme docsy. So, I dont have to depend if Hugo change the settings for highlighting or something became overriding in theme...

Here I explain better.

Regards!! ;)

@ghost
Copy link

ghost commented Jun 21, 2020

@LisaFC, any updates on this? the issue still persists.

@LisaFC
Copy link
Collaborator

LisaFC commented Jun 22, 2020

Thanks for the reminder! Will try to look at it this week.

@ghost
Copy link

ghost commented Jul 10, 2020

hey @LisaFC, Sorry to bother again, but any chance you could take a look at this soon :)

@LisaFC
Copy link
Collaborator

LisaFC commented Jul 20, 2020

Hey, sorry for the late reply (I was on vacation), I will try to get to it this week along with catching up on the day job. :)

@LisaFC
Copy link
Collaborator

LisaFC commented Jul 21, 2020

OK, I've fixed it but need to make sure it doesn't do anything really bizarre for people using pre-0.60 Hugo.

Might do a quick survey on the mailing list....

@LisaFC
Copy link
Collaborator

LisaFC commented Jul 21, 2020

One other thought is that if you don't specify a language for the block you don't get your chosen highlight formatting (it's just black text on a grey background) but I think that's a Hugo thing rather than anything in our CSS. You can get around it by setting "guessSyntax" to "true" and then all fenced code blocks end up in a highlight div (it hasn't given me anything particularly odd yet, but...).

Also my fix definitely gives ok results deploying with 0.59 so I think I'll get a PR together.

@LisaFC
Copy link
Collaborator

LisaFC commented Jul 22, 2020

Have a look at #312. It does mean that users who update to the latest template will also need to update their config.toml files if they don't want to use Monokai, but maybe that's ok?

@ghost
Copy link

ghost commented Jul 22, 2020

Hey @LisaFC ,just tested it, everything working for me. Thanks a lot. 👍 🙏

Hugo version:
Hugo Static Site Generator v0.68.3-157669A0/extended linux/amd64 BuildDate: 2020-03-24T12:13:38Z

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants