VirtusLab / git-machete

Probably the sharpest git repository organizer & rebase/merge workflow automation tool you've ever seen
MIT License
910 stars 52 forks source link

Move html style that color text in documentation to separate files and include them as sphinx requires #213

Open BartoszSiwinski opened 3 years ago

BartoszSiwinski commented 3 years ago

After #202 refactor the way how html style is expanded:

I've added some coloring, but I didn't manage to get it to work in code blocks and it's a bit dirty solution. I'm adding roles (as I understand it's the recommended way of doing colored text), but I'm making it work via this:

.. raw:: html

    <style> .green {color:green} </style>
    <style> .grey {color:dimgrey} </style>
    <style> .red {color:red} </style>
    <style> .yellow {color:yellow} </style>

.. role:: green
.. role:: grey
.. role:: red
.. role:: yellow

Html style can be extracted to separate files and it would be cleaner. It requires some investigation on how to expand html style in sphinx, which directory should it be added to, will they collide with some other ones etc.

PawelLipski commented 3 years ago

Removing enhancement label, I'm gonna remove this label to new feature for clarity

PawelLipski commented 2 years ago

Hmmm actually... it looks for me that the .. raw:: html and .. role:: blocks in individual .rst aren't needed... at least as of the current develop around v3.9.0, which has:

sphinx==4.4.0
sphinx-rtd-theme==0.5.2

Probably they just need to be defined once in some top-level file anyway, which would be much easier to do.