Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix code highlighting #45

Closed
bep opened this issue Jul 17, 2017 · 9 comments
Closed

Fix code highlighting #45

bep opened this issue Jul 17, 2017 · 9 comments
Assignees
Labels

Comments

@bep
Copy link
Member

bep commented Jul 17, 2017

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

@moorereason moorereason changed the title Improve code hightlighting Improve code highlighting Jul 17, 2017
@rdwatters
Copy link
Contributor

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.

@bep
Copy link
Member Author

bep commented Jul 19, 2017

@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.

@bep
Copy link
Member Author

bep commented Jul 19, 2017

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.

@budparr
Copy link

budparr commented Jul 19, 2017

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.

@bep
Copy link
Member Author

bep commented Jul 19, 2017

@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.

@bep bep added the Bug label Jul 19, 2017
@bep bep changed the title Improve code highlighting Fix code highlighting Jul 19, 2017
@budparr
Copy link

budparr commented Jul 19, 2017

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.

@bep
Copy link
Member Author

bep commented Jul 19, 2017

Let us handle this in #50

@bep bep closed this as completed Jul 19, 2017
@bep
Copy link
Member Author

bep commented Jul 19, 2017

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.

@rdwatters
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants