Giter VIP home page Giter VIP logo

Comments (7)

tarpdalton avatar tarpdalton commented on June 9, 2024 1

A hacky way to switch to chroma is to add an empty file at /static/js/highlight.pack.js and add pygmentsCodeFences = true to config.toml (if you're using backticks for code blocks).

It loads a little faster, but is not a good solution since it still tries to reference highlight.js.
I'll have to look into making it an option in the config, and making sure hugo doesn't load/reference the unneeded resources.

from hugo-theme-docdock.

vjeantet avatar vjeantet commented on June 9, 2024

Yes there is, highlight.js is about 500kb ;-(

You could make a PR ?

from hugo-theme-docdock.

tarpdalton avatar tarpdalton commented on June 9, 2024

Yeah I’ll try to start working on it. I just didn’t want to start if it wasn’t wanted/needed

from hugo-theme-docdock.

vjeantet avatar vjeantet commented on June 9, 2024

Cool

from hugo-theme-docdock.

tarpdalton avatar tarpdalton commented on June 9, 2024

It looks like adding pygmentsCodeFences = true to config.toml, or using the highlight shortcode will use chroma for syntax highlighting. So I think it is a matter of removing the highlight.js file and the css.

from hugo-theme-docdock.

tonivj5 avatar tonivj5 commented on June 9, 2024

Could it be optional? I would like to have the option of use chroma or highlight

from hugo-theme-docdock.

DaddyOh avatar DaddyOh commented on June 9, 2024

I'd like to have the choice for either chroma or highlight.js. Thanks for considering this change.

from hugo-theme-docdock.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.