Skip to content

add code highlight, fixes #9 #26

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

Merged
merged 1 commit into from
Nov 7, 2020

Conversation

mireille-raad
Copy link
Member

The current code blocks:

  • were overflowing on mobile and causing horizontal page scroll
  • there was no code highlighting, code blocks just looked a little different

This PR ads code highlighting...

  • for inline code blocks, it still looks like github
  • for bigger code blocks, I used a dark theme because it makes code blocks more visible

I used the built-in thing that comes with Jekyll
https://jekyllrb.com/docs/liquid/tags/#code-snippet-highlighting
http://rouge.jneen.net/

For the style sheets, I went with a Pygments theme called monokai

https://jekyllrb.com/docs/liquid/tags/#stylesheets-for-syntax-highlighting
https://jwarby.github.io/jekyll-pygments-themes/languages/ruby.html

Screnshots

Screenshot from 2020-11-06 10-59-11

Screenshot from 2020-11-06 09-23-23

mobile is not ideal, the line wrap squishes things
Screenshot from 2020-11-06 09-28-31

Copy link
Member

@coolreader18 coolreader18 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@youknowone youknowone merged commit f74ee22 into RustPython:master Nov 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants