typemill / typemill

Typemill is a lightweight, flat-file CMS designed for simple, fast, and flexible website and eBook creation using Markdown.
https://typemill.net
MIT License
427 stars 60 forks source link

Typemill - hljs plugin - add badge option and update to version 11 of hljs #319

Closed MysterieDev closed 2 years ago

MysterieDev commented 2 years ago

PR: https://github.com/typemill-resources/highlight/pull/2 image image image

trendschau commented 2 years ago

great!! Just checked it but the highlights-copy is missing in the public folder.

Is it this here? https://github.com/arronhunt/highlightjs-copy

Then I can add and publish the new version.

MysterieDev commented 2 years ago

Oh! Yeah it's, just the cdn scripts downlaoded

MysterieDev commented 2 years ago

@trendschau for some reason I forgot to add it to the commit, but I also forgot the hljs file itself https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.4.0/highlight.min.js

trendschau commented 2 years ago

thank you! Is there any reason why it uses 11.4.0 and not 11.5.0?

MysterieDev commented 2 years ago

Not really, I just tested it with a version I had locally, which was 11.4

trendschau commented 2 years ago

Hm, I still get message that hljs.addPlugin and hljs.highlightAll not a function. Do you have a working local version and can you commit it to github?

MysterieDev commented 2 years ago

Yes, I'll draft a pr

MysterieDev commented 2 years ago

https://github.com/typemill-resources/highlight/pull/3/files try out that one, works on my installation

trendschau commented 2 years ago

ok, added the highlights-copy.min.css file manually and pushed it. Now it works. I will publish it later today.