mirror of
https://ghfast.top/https://github.com/zsjy/halo-theme-dream2.0-plus.git
synced 2025-03-16 03:09:41 +08:00
优化katex
This commit is contained in:
parent
bf1fe75e56
commit
55628bb060
@ -132,7 +132,7 @@ $(document).on('pjax:success', async function (event, data, status, xhr, options
|
||||
$currentTarget.filter('link').filter(function() {
|
||||
const isDataPjax = $(this).is('[data-pjax]')
|
||||
const href = $(this).attr('href')
|
||||
const isStaticPath = href && (href.startsWith('/plugins/PluginHighlightJS/'))
|
||||
const isStaticPath = href && (href.startsWith('/plugins/PluginHighlightJS/') || href.startsWith('/plugins/plugin-katex/'))
|
||||
return isDataPjax || isStaticPath
|
||||
}).each(function () {
|
||||
let href = $(this).attr('href')
|
||||
@ -149,7 +149,7 @@ $(document).on('pjax:success', async function (event, data, status, xhr, options
|
||||
let $scripts = $currentTarget.filter('script').filter(function() {
|
||||
const isDataPjax = $(this).is('[data-pjax]')
|
||||
const src = $(this).attr('src')
|
||||
const isStaticPath = src && (src.startsWith('/plugins/PluginHighlightJS/'))
|
||||
const isStaticPath = src && (src.startsWith('/plugins/PluginHighlightJS/') || src.startsWith('/plugins/plugin-katex/'))
|
||||
return isDataPjax || isStaticPath
|
||||
})
|
||||
if ($scripts.length > 0) {
|
||||
|
2
templates/assets/js/pjax.min.js
vendored
2
templates/assets/js/pjax.min.js
vendored
File diff suppressed because one or more lines are too long
@ -2,7 +2,7 @@
|
||||
th:with="description=${isPost ? post != null ? post.status.excerpt : singlePage != null ? singlePage.status.excerpt : site.seo.description : site.seo.description}">
|
||||
<meta charset="utf-8"/>
|
||||
<title th:text="${title + (#strings.isEmpty(site.subtitle) ? '' : '|' + site.subtitle)}"></title>
|
||||
<script th:if="${theme.config.enhance.enable_sw}" th:src="${(theme.config.enhance.enable_sw == 'uninstall')? #theme.assets('/js/sw.min.js?uninstall=true') + '&mew='+theme.spec.version : '/sw.min.js?mew='+theme.spec.version + theme.config.enhance.enable_sw + '&cdn=' + theme.config.enhance.sw_cdn_source.replaceAll('\n', ',')}"></script>
|
||||
<script th:if="${theme.config.enhance.enable_sw}" th:src="${(theme.config.enhance.enable_sw == 'uninstall')? #theme.assets('/js/sw.min.js?uninstall=true') + '&mew=1.3.0' : '/sw.min.js?mew=1.3.0' + theme.config.enhance.enable_sw + '&cdn=' + theme.config.enhance.sw_cdn_source.replaceAll('\n', ',')}"></script>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<meta name="applicable-device" content="pc,mobile">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
|
Loading…
x
Reference in New Issue
Block a user