FernandoCelmer / mkdocs-simple-blog

Blog Template for Mkdocs
https://fernandocelmer.github.io/mkdocs-simple-blog/
MIT License
80 stars 5 forks source link

[Feature Request]Simple code syntax highlighting #35

Open IcyFeather233 opened 7 months ago

IcyFeather233 commented 7 months ago

Describe the feature

Simple code syntax highlighting, just as most of technical blogs.

Use Case

Currently, all code blocks are in black and white. As a minimalist blog, it seems necessary to have a simple syntax highlighting setting. I hope it can be made into an option, so that those who need it can enable syntax highlighting, while those who don't need it can continue to keep their code blocks in black and white.

Proposed Solution

No response

Other Information

No response

Acknowledgements

SDK version used

Any

Environment details (OS name and version, etc.)

Any

FernandoCelmer commented 7 months ago

@IcyFeather233 Cool, this feature is really good. I started a brief analysis to implement this improvement, if you want to help you can also open a pull request. I will use a library called highlightjs.

saulmmendoza commented 1 month ago

Hi @FernandoCelmer the highlight isn't working properly, I think it should call hljs.highlightAll() instead of hljs.initHighlightingOnLoad() according to the highlightjs README