xiaoheiAh/hugo-theme-pure

highligth style is broken when using language specifiers

ssbarnea opened this issue · 6 comments

Here is an example that will render pretty badly:

```ini
[section]
key=value
# comment
```

```batch
:: comment
@echo foo
```

While the highlight works fine there are some dark regions that ruin the layout.

ss

this theme is not compatible with hugo shortcode highlight.It would be better just use markdown syntax.Besides you can set highlighths.lang params to append some unusual language when you code can not highlight.You can search highlight.js on https://staticfile.org to check if there have your language highlight.js

I prefer to stick to default hugo features and I even tried to disabled the hilight.js.

I found the fix for it: PygmentsCodeFences: false on https://discourse.gohugo.io/t/pygmentscodefences-how-to-choose-themes/3842

Apparently this sorts the issue for good. Now I am not sure if there is something this theme can do about this, like changing default? Or at least it should mention this setting in the example site with a comment.

set PygmentsCodeFences: false and use highlight shortcode didn't work for me.
image

https://github.com/xiaoheiAh/hugo-theme-pure/tree/feat-optimization
Could you test these feature?Just pull this branch.I have support highlight basic usage

I just pushed my website source to https://github.com/ssbarnea/sbarnea.com/blob/master/config.yaml#L10 and also published it. It works fine. Maybe you are not using latest version of hugo?

I will have a look at your branch but apparently it has too many mixed customizations. For example I don't like the new custom font at all. I can understand that you may want it but is better to add the font to your project and use an override to enable it. The theme should be kept as "pure" as possible ;)

BTW, I am curious why you do not like the native highligther in hugo? One majog advantage is that it uses the same syntax as github markdown and that is key for me as I want to avoid polutting my markdown files with hugo specific constructs.

Thanks for your reply.I will not merge that branch to master.
Highlight short code just used by hugo,I prefer to use native markdown syntax that I can transfer to other platform.