mkdocs / mkdocs

Project documentation with Markdown.
https://www.mkdocs.org
BSD 2-Clause "Simplified" License
19.18k stars 2.4k forks source link

[FR] Alternative setting for highlightjs #3189

Open redtide opened 1 year ago

redtide commented 1 year ago

Current:

highlightjs: true
hljs_languages:
- cpp
hljs_style: github

Alternative:

highlightjs:
  languages:
     builtin:
     - cpp
     extra (or custom or whatever):
     - relative or abs url to customlanguage.min.js
  style: github

or if #2171 would be (finally) a thing (or not, needs some strategy to support also only 1 mode by defining 1 of 2):

highlightjs:
  ...
  style:
    light: github
    dark: github-dark
oprypin commented 1 year ago

That's a fine suggestion for a refactor (just makes it looks nice), but what's the practical benefit that would justify incompatibility or duplication?

tomchristie commented 5 months ago

Really it'd be neater if highlightjs (or whatever other alternative) was included through overriding the template styles/libs blocks, rather than through config. Perhaps something to move towards as part of #3190.

redtide commented 5 months ago

Really it'd be neater if highlightjs (or whatever other alternative) was included through overriding the template styles/libs blocks, rather than through config. Perhaps something to move towards as part of #3190.

in general you say "less integrations, more modularity", I totally agree that that's a better choice.