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

Replace pygments and {% highlight %} syntax with GFM #308

Open
dlech opened this issue Dec 10, 2016 · 4 comments
Open

Replace pygments and {% highlight %} syntax with GFM #308

dlech opened this issue Dec 10, 2016 · 4 comments

Comments

@dlech
Copy link
Member

dlech commented Dec 10, 2016

I have just seen this, which has convinced me that using GFM code fences is the right way to go (even though I don't particularly like them).

The highlight zone

GitHub Pages now only supports Rouge, a pure-Ruby syntax highlighter, meaning you no longer need to install Python and Pygments to preview your site locally. If you were previously using Pygments for highlighting, the two libraries are feature compatible, so we'll swap Rouge in for Pygments when we build your site, to ensure a seamless transition.

Traditionally, highlighting in Jekyll has been implemented via the {% highlight %} Liquid tag, forcing you to leave a pure-Markdown experience. With kramdown and Rouge as the new defaults, syntax highlighting on GitHub Pages should work like you'd expect it to work anywhere else on GitHub, with native support for backtick-style fenced code blocks right within the Markdown.

@dlech
Copy link
Member Author

dlech commented Dec 10, 2016

So, we should replace all instances of {% highlight %} and drop the pygments css.

@WasabiFan
Copy link
Member

Does this mean that we can drop that extra CSS? IIRC from my testing a few weeks ago, neither code formatting method worked without the custom CSS. Or maybe the issue was that the default CSS didn't look right on our site... I'm not sure.

@dlech
Copy link
Member Author

dlech commented Dec 10, 2016

Did you edit highlight: in _config.yml? I haven't tried it, you could be right that we need to keep the css.

@WasabiFan
Copy link
Member

Maybe? 😊 I can't say it was a particularly scientific test... I don't want to draw any conclusions based on my demonstrably bad memory.

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

No branches or pull requests

2 participants