Giter Site home page Giter Site logo

Fix code highlighting about hugodocs HOT 9 CLOSED

gohugoio avatar gohugoio commented on May 19, 2024 1
Fix code highlighting

from hugodocs.

Comments (9)

rdwatters avatar rdwatters commented on May 19, 2024

Not sure what "```golang" is supposed to trigger

https://github.com/gohugoio/gohugoioTheme/blob/master/src/js/hljs.js#L14

There are aliases hugo and golang set up for go. This was partially from the previous site's content and partially from the last design, which included icons at the top right of each copyable code block to denote the file format.

I can modify all code blocks to use html, but colors and js should be an issue in the Hugo theme repo. I'll open an issue there.

from hugodocs.

bep avatar bep commented on May 19, 2024

@rdwatters if it is html it should be changed in the source (i.e. the content files in this repo), but does not solve the real problem: I have tested with both html and golang and it still doesn't look good. So it would be good to address the real problem and not just one of the less important bullet points in the list above.

from hugodocs.

bep avatar bep commented on May 19, 2024

Just to be clear: Keep the golang tagging. This has to be fixed in the highlight.js definition/config, if possible; I will see if I understand it.

from hugodocs.

budparr avatar budparr commented on May 19, 2024

The variances are due to the way they are designated in the content. The style is subjective and can be chosen here: https://highlightjs.org/static/demo/ if you prefer to pick one out yourself.

from hugodocs.

bep avatar bep commented on May 19, 2024

@budparr you are replying to these issues as you would to random people from a third support line.

Let me rephrase:

The code highlighting, esp. for the custom golang language definition, looks like crap, and should be fixed.

from hugodocs.

budparr avatar budparr commented on May 19, 2024

Apologies, @bep. Wasn't my intent, just a bit of hit-and-run on my part for time-sake. There's an issue for making the content more consistent here: gohugoio/gohugoioTheme#50

And because you didn't like the color scheme I chose—which I chose to be Hugo-like— I thought you might want to choose one yourself.

from hugodocs.

bep avatar bep commented on May 19, 2024

Let us handle this in #50

from hugodocs.

bep avatar bep commented on May 19, 2024

This has nothing to do with the colour scheme. Or very little, but I will fix it now that I have an actual working dev environment.

from hugodocs.

rdwatters avatar rdwatters commented on May 19, 2024

but does not solve the real problem

Right. That's why I opened up the other issue. As for the language designation, I always think it's worth making content consistent, and it's just a quick find and replace anyways. I can do golang if that's what you want. I'll submit a PR this afternoon.

from hugodocs.

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.