mirror of
https://git.sr.ht/~tsileo/microblog.pub
synced 2024-11-14 10:44:27 +00:00
Tweak the default code highlighting theme
This commit is contained in:
parent
6ce42e019e
commit
5845bb72f5
2 changed files with 6 additions and 1 deletions
|
@ -93,6 +93,9 @@ EMOJI_TPL = '<img src="/static/twemoji/{filename}.svg" alt="{raw}" class="emoji"
|
|||
|
||||
_load_emojis(ROOT_DIR, BASE_URL)
|
||||
|
||||
# TODO(ts): allow to override this
|
||||
CODE_HIGHLIGHTING_THEME = "friendly_grayscale"
|
||||
|
||||
|
||||
session_serializer = URLSafeTimedSerializer(
|
||||
CONFIG.secret,
|
||||
|
|
|
@ -5,7 +5,9 @@ from pygments import highlight as phighlight # type: ignore
|
|||
from pygments.formatters import HtmlFormatter # type: ignore
|
||||
from pygments.lexers import guess_lexer # type: ignore
|
||||
|
||||
_FORMATTER = HtmlFormatter(style="vim")
|
||||
from app.config import CODE_HIGHLIGHTING_THEME
|
||||
|
||||
_FORMATTER = HtmlFormatter(style=CODE_HIGHLIGHTING_THEME)
|
||||
|
||||
HIGHLIGHT_CSS = _FORMATTER.get_style_defs()
|
||||
|
||||
|
|
Loading…
Reference in a new issue