adisaktijrs / hexo-theme-minima

A lightweight dark/light theme for Hexo.js
https://adisaktijrs.github.io/minima
MIT License
220 stars 51 forks source link

About code highlighting #28

Closed jinzhongjia closed 2 years ago

jinzhongjia commented 2 years ago

I found a lot of topics about Prism in your source code, why don't we add more? hh😉 I think we can add something interesting to this "layout.ejs" through the theme "_config.yml"

adisaktijrs commented 2 years ago

Sounds cool! Can you give me some examples tho? It's been a long time since I last worked on this project haha

jinzhongjia commented 2 years ago

I found that the "prism-coldark-cold" theme come from this repository ,"https://github.com/PrismJS/prism-themes" I think we can add some of these themes to minima,because the default prismjs theme is a little monotonous.

adisaktijrs commented 2 years ago

Hi there. Sorry for slow response hehe. Do you mean adding some alternative theme of Prismjs so they can choose it from _config.yml?

It's cool idea, but I am afraid it would make the theme load-time slower since it should load many themes? Or do you have any idea?

jinzhongjia commented 2 years ago

I don't know if hexo can package only the primjs theme used in theme _config.yml, and i found in layout.ejs,I found that layout.ejs can only make the page load the primjs theme we need by judging, although this may make the packaged file larger Sorry, I have no experience with ejs before🥺

adisaktijrs commented 2 years ago

It's OK ✌️, I can update the theme with a new one in the next release. Anyway, thank you for your PR tho, it's a useful feature, I just merged it