mirror of
https://github.com/qdrant/landing_page.git
synced 2026-10-12 06:18:31 +02:00
added MathJax support (#24)
This commit is contained in:
@@ -28,3 +28,5 @@
|
|||||||
<!-- highlight.js -->
|
<!-- highlight.js -->
|
||||||
{{ if .Site.Params.highlight | default false }} <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.4.0/styles/default.min.css"> {{ end }}
|
{{ if .Site.Params.highlight | default false }} <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.4.0/styles/default.min.css"> {{ end }}
|
||||||
<link rel="stylesheet" href="{{ "css/lang-switcher.css" | absURL }}">
|
<link rel="stylesheet" href="{{ "css/lang-switcher.css" | absURL }}">
|
||||||
|
|
||||||
|
<link rel="stylesheet" href="{{ "css/mathjax.css" | absURL }}">
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
<script src="https://polyfill.io/v3/polyfill.min.js?features=es6"></script>
|
||||||
<script src="{{ "js/jquery.js" | absURL }}"></script>
|
<script src="{{ "js/jquery.js" | absURL }}"></script>
|
||||||
<script src="{{ "js/popper.min.js" | absURL }}"></script>
|
<script src="{{ "js/popper.min.js" | absURL }}"></script>
|
||||||
<script src="{{ "js/jquery.scrollTo.js" | absURL }}"></script>
|
<script src="{{ "js/jquery.scrollTo.js" | absURL }}"></script>
|
||||||
@@ -65,3 +66,25 @@
|
|||||||
{{ end }}
|
{{ end }}
|
||||||
<script src="{{ "js/lang-switcher.js" | absURL }}"></script>
|
<script src="{{ "js/lang-switcher.js" | absURL }}"></script>
|
||||||
<script src="{{ "js/copy-code.js" | absURL }}"></script>
|
<script src="{{ "js/copy-code.js" | absURL }}"></script>
|
||||||
|
|
||||||
|
<!-- MathJax support -->
|
||||||
|
<script>
|
||||||
|
MathJax = {
|
||||||
|
tex: {
|
||||||
|
inlineMath: [['$', '$'], ['\\(', '\\)']],
|
||||||
|
displayMath: [['$$','$$'], ['\\[', '\\]']],
|
||||||
|
processEscapes: true,
|
||||||
|
processEnvironments: true
|
||||||
|
},
|
||||||
|
options: {
|
||||||
|
skipHtmlTags: ['script', 'noscript', 'style', 'textarea', 'pre']
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
window.addEventListener('load', (event) => {
|
||||||
|
document.querySelectorAll("mjx-container").forEach(function(x){
|
||||||
|
x.parentElement.classList += 'has-jax'})
|
||||||
|
});
|
||||||
|
|
||||||
|
</script>
|
||||||
|
<script id="MathJax-script" async src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"></script>
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
code.has-jax {
|
||||||
|
-webkit-font-smoothing: antialiased;
|
||||||
|
background: inherit !important;
|
||||||
|
border: none !important;
|
||||||
|
font-size: 100%;
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user