mstdn.social is one of the many independent Mastodon servers you can use to participate in the fediverse.
A general-purpose Mastodon server with a 500 character limit. All languages are welcome.

Administered by:

Server stats:

12K
active users

Brian Marick

On the left is the syntax highlighting offered by Hugo for Elixir programs. On the right is the uncolorized, un-font-messed-with version. Which would you rather see in a blog post? Poll follows in response.

Which of the above representations of Elixir code would you prefer to see?

@marick oh yikes. Can I have colors, but without the weird variable font sizing? It looks like it's made from pasted together magazine clippings.

@bradwilson @jenniferplusplus I don’t know. I’m a newbie to Hugo and its font sizing. As far as I can tell, I only get one choice for code highlighting. (gohugo.io/content-management/s suggests three choices, but they all actually do the same thing).

The font-sizing is horrible, I agree, especially because it highlights what I don’t look at and minimized what I do look at.

gohugo.ioSyntax highlightingHugo comes with really fast syntax highlighting from Chroma.

@marick Colors - just not THOSE colors. White/light background for documentation I feel.

@talios I too would prefer less IN YOUR FACE colors, but I’m more concerned with figuring out what in the toolchain DECIDES to capitalize CERTAIN classes of tokens that I think NOT SO important. No luck yet.

@marick @talios the varying font sizes are incredibly strange.

Some tools will only attach CSS classes and leave the formatting to you, which take 20 mins more to set up but is very flexible.

@sminnee @talios Twenty minutes more if I knew what file I had to change and how, but I don’t. It seems to be a mystery buried in the toolchain.

@marick i love colors but messing with font size triggers me in horrible ways

@windrunner I share your reaction. That was what prompted me to ask.

@marick: Not sure it’s a fair comparison because it’s not the same code.

The grayscale is more readable to me, but it’s not because of the colors or lack thereof.

I have a theme I use that I appreciate because the syntax “fades” while emphasizing the important things.

That said, my brain has never mapped in a way that themes become super helpful.

@itsjoshbruce I think you and I have similar preferences. But I think I only get two choices with Hugo*: nothing or crazy font changes.

* Yeah, it’s just code, but I’m *already* going down two rabbit holes; I don’t need another.

@paulwilson Yeah, whichever choice is made, no one will be happy. Even the people on the winning side will be annoyed I didn’t do the winning thing the way they would have done it.

(I’m in a bad mood. I want to explore ideas, and all I’ve been doing is fiddling with tools whose unstated assumptions and preconditions aren’t ones I share. Bah! Humbug!)

@marick Colors, but ugh that changing font size 🤮

@marick If that can't be changed, I prefer that b&w one

@marick my vote would be for monospaced in color. I think in this example the monochrome is better than the one with multiple different font sizes

@jnkrtech You and me, too, brother. But I think I don’t get that choice. Maybe I’ll ask around and there are other choices I can wedge into Hugo without going on a huge yak shaving expedition.

gohugo.io/content-management/s

gohugo.ioSyntax highlightingHugo comes with really fast syntax highlighting from Chroma.

@marick I prefer you only color the code you’re trying to draw my attention to

@dimsumthinking I share your preference, but I’m stuck with preexisting templates.

What I’ve done in my books, given no other options, is put ^^^^^ highlighting under such text. I also repeat the snippets I’m talking about right next to where I’m talking about them. Scrolling around to see the code is for the birds.

@marick Yeah - sadly that led me to building my own. Generally code is colored one of the two ways you showed. The other advantage is my coloring works in light or dark mode on Apple Books.

@dimsumthinking Your yak-shaving prowess is something for us lazy people to admire.