Patch light mode pygments to remove hardcoded background
Both dark and light mode now use theme CSS variables for backgrounds
This commit is contained in:
parent
05c9f19913
commit
04ccdcd881
1 changed files with 2 additions and 1 deletions
3
Makefile
3
Makefile
|
|
@ -55,6 +55,7 @@ pygments:
|
|||
@echo "Generating pygments stylesheets..."
|
||||
venv/bin/python -c "from pygments.formatters import HtmlFormatter; print(HtmlFormatter(style='monokai').get_style_defs('.highlight'))" > pelican-themes/pelican-svbhack/static/css/pygments-dark.css
|
||||
venv/bin/python -c "from pygments.formatters import HtmlFormatter; print(HtmlFormatter(style='default').get_style_defs('.highlight'))" > pelican-themes/pelican-svbhack/static/css/pygments-light.css
|
||||
@echo "Patching dark mode to remove hardcoded background..."
|
||||
@echo "Patching to remove hardcoded backgrounds..."
|
||||
sed -i 's/.highlight { background: #272822; color: #f8f8f2 }/.highlight { color: #f8f8f2 }/' pelican-themes/pelican-svbhack/static/css/pygments-dark.css
|
||||
sed -i 's/.highlight { background: #f8f8f8; }/.highlight { }/' pelican-themes/pelican-svbhack/static/css/pygments-light.css
|
||||
@echo "Done! Pygments stylesheets generated and patched."
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue