|
From: rtoy <rt...@us...> - 2025-09-08 18:52:13
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Maxima CAS".
The branch, rtoy-highlightjs-dark-mode has been created
at 5d25a7ff85f81f4a4014341aa8bd2cc006eff666 (commit)
- Log -----------------------------------------------------------------
commit 5d25a7ff85f81f4a4014341aa8bd2cc006eff666
Author: Raymond Toy <toy...@gm...>
Date: Mon Sep 8 11:49:06 2025 -0700
Allow highlightjs to use github-dark when in dark mode.
For dark mode with highlightjs, we use github-dark (since we're using
github for light mode).
This is done by adding a new link tag to
HIGHLIGHT1 in configure.ac to specify github-dark when dark mode is
preferred. We also update the existing link to github to specify
light mode for this.
This doesn't look very good in dark mode, though because the default
example background is a dark gray.
But this is a step in supporting dark mode when using highlightjs for
the examples.
diff --git a/configure.ac b/configure.ac
index 7cb032981..34ce9a55c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -745,7 +745,7 @@ if test x"${enable_build_docs}" = xtrue ; then
TEXI_EXTRA_TAIL=')'
fi
if test x${syntax_highlighting} = xhighlightjs; then
- HIGHLIGHT1='<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.10.0/styles/github.min.css"> <script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.10.0/highlight.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.10.0/languages/maxima.min.js"> </script>
+ HIGHLIGHT1='<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.10.0/styles/github.min.css" media="(prefers-color-scheme: light)"> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.10.0/styles/github-dark.min.css" media="(prefers-color-scheme: dark")> <script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.10.0/highlight.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.10.0/languages/maxima.min.js"> </script>
'
HIGHLIGHT2="<script> hljs.configure({languages: [['Maxima']], cssSelector: ${HLJS_CSS_SELECTOR}}); hljs.highlightAll(); </script>
"
-----------------------------------------------------------------------
hooks/post-receive
--
Maxima CAS
|