crate / crate-docs-theme

A Sphinx theme for the CrateDB documentation.

Home Page:https://crate-docs-theme.readthedocs.io/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Rework syntax highlighting of code snippets

amotl opened this issue · comments

If we want to go totally crazy, we could rework the code-boxes / syntax highlighting 😬
image
-- https://crate.io/docs/crate/tutorials/en/latest/install.html

Originally posted by @proddata in #248 (comment)

I hope it is clear, that I only quickly changed the font and background color, and this wouldn't be my "favourite" colours after all :D

I think in general it would improve readability if the background of code-blocks is not grey, as the code parts are separated from the text parts.

image

For reference:

Influx
image

MongoDB
image

Timescale
image

Hi @proddata,

on my machine, the cited documentation section looks like this:

image

I believe it is not that bad. What exactly would you suggest here?

With kind regards,
Andreas.

P.S.: The syntax highlighting is implemented by the fine Pygments package.

/cc @msbt, @belringer

P.S.: The syntax highlighting is implemented by the fine Pygments package.

Apparently, Pygments implements different kinds of styles already, see https://pygments.org/docs/styles/. Let me know if you would like to see a different one.

[1] lists some pointers to example style galleries for Pygments. [2] hosts a demo page from the Pygments project itself, while [3,4,5] seem to be galleries implemented by others. [5] seems to be the most exhaustive and convenient one.

[1] https://superuser.com/questions/374509/where-can-i-find-a-gallery-of-pygments-css-files
[2] https://pygments.org/demo/
[3] https://help.farbox.com/pygments.html
[4] https://blog.yjl.im/2015/08/pygments-styles-gallery.html
[5] https://stylishthemes.github.io/Syntax-Themes/pygments/

What about trying out Darcula?

SQL

image

Python

image

Material might fit with the color scheme 😬
image

Hi again,

thank you for your feedback. I've implemented this with #273.

With kind regards,
Andreas.