Coder Social home page Coder Social logo

code highlight about beautifulhugo HOT 3 CLOSED

halogenica avatar halogenica commented on June 10, 2024
code highlight

from beautifulhugo.

Comments (3)

halogenica avatar halogenica commented on June 10, 2024

Thank you for pointing out the broken highlighting on the demo!

I just verified that highlighting does work however it requires pygments to be installed (install python, then run "pip install Pygments"). This is is supposedly one of the standard methods of server side highlighting supported by hugo, which can be seen on the following page: https://gohugo.io/extras/highlighting/

It certainly seems that the hugo server used to generate the demos does not have this installed. Moreover, it is easy to miss the instructions I have given to install it (which can be found in the readme under the "Syntax Highlighting" section). For those reasons, and since the theme this was ported from does not use pygment highlighting, I will consider replacing the server side highlighting with client side highlighting.

Hopefully the problem you're seeing is fixed with the simple pygments install, and I will close this bug. If not, then I hope a future update to perform client side highlighting will fix your problem.

from beautifulhugo.

halogenica avatar halogenica commented on June 10, 2024

I just added client side syntax highlighting support with 938766f. I hope that helps!

from beautifulhugo.

yiqiok avatar yiqiok commented on June 10, 2024

Hi halogenica ! Thanks a lot . I just using "~ ~ ~" as a container of the code ,and it works .

from beautifulhugo.

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.