parsiya / Hugo-Octopress

Port of the classic Octopress theme to Hugo
MIT License
155 stars 52 forks source link

Gist shortcode layout seems broken #42

Closed simonszu closed 6 years ago

simonszu commented 6 years ago

Hi, either this theme does not support it, or gist's delivery method changed. However, the output of the gist shortcode looks incomplete and broken. For reference, see here (at the bottom). Notice the missing syntax highlighting, and the serif font.

How could anybody fix this?

parsiya commented 6 years ago

The gist shortcode was not in Hugo when I made the theme so I never tried it. Let me look at it and see what the output looks like. It has some syntax highlighting but not what we want. The way the CSS works (because it's lifted directly from Octopress), the CSS has the highlights. The gist shortcode creates a class named gist so I might need to see how I can apply the same highlighting to it in css.

parsiya commented 6 years ago

See this branch: https://github.com/parsiya/Hugo-Octopress/tree/gist-fix

Github CSS was overiding the blog CSS. Not all of it looks exactly the same because Github and Pygments do highlighting differently sometimes.

I still need to tweak the CSS if we want them to look exactly the same (for example the line numbers) but it works for now.

Here's what it looks like, the top ones are the gists and then you have the codecaption shortcode:

image

parsiya commented 6 years ago

I merged that branch into master.

simonszu commented 6 years ago

Nice, looks good. Thank you very much.

parsiya commented 6 years ago

Great, let me know if other stuff is broken.