mirror of
https://github.com/next-theme/hexo-theme-next.git
synced 2026-01-20 19:02:33 +00:00
Fix id conflict with markdown headerlink
This commit is contained in:
parent
ab2cbd4157
commit
7f3e4b16c1
@ -45,7 +45,7 @@
|
||||
{{ partial('_third-party/index.njk', {}, {cache: theme.cache.enable}) }}
|
||||
|
||||
{%- if theme.pjax %}
|
||||
<div id="pjax">
|
||||
<div class="pjax">
|
||||
{%- endif %}
|
||||
{% include '_third-party/math/index.njk' %}
|
||||
{% include '_third-party/quicklink.njk' %}
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
{{ canonical() }}
|
||||
|
||||
{# Exports some front-matter variables to Front-End #}
|
||||
<script{{ pjax }} id="page-configurations">
|
||||
<script{{ pjax }} class="page-configurations">
|
||||
// https://hexo.io/docs/variables.html
|
||||
CONFIG.page = {
|
||||
sidebar: {{ page.sidebar | safedump }},
|
||||
|
||||
@ -2,11 +2,11 @@
|
||||
var pjax = new Pjax({
|
||||
selectors: [
|
||||
'head title',
|
||||
'#page-configurations',
|
||||
'.page-configurations',
|
||||
'.main-inner',
|
||||
'.post-toc-wrap',
|
||||
'.languages',
|
||||
'#pjax'
|
||||
'.pjax'
|
||||
],
|
||||
analytics: false,
|
||||
cacheBust: false,
|
||||
@ -14,7 +14,7 @@ var pjax = new Pjax({
|
||||
});
|
||||
|
||||
document.addEventListener('pjax:success', () => {
|
||||
pjax.executeScripts(document.querySelectorAll('script[data-pjax], #pjax script'));
|
||||
pjax.executeScripts(document.querySelectorAll('script[data-pjax], .pjax script'));
|
||||
NexT.boot.refresh();
|
||||
// Define Motion Sequence & Bootstrap Motion.
|
||||
if (CONFIG.motion.enable) {
|
||||
|
||||
@ -38,7 +38,7 @@ hexo.extend.helper.register('next_config', function() {
|
||||
if (config.search) {
|
||||
exportConfig.path = config.search.path;
|
||||
}
|
||||
return `<script id="hexo-configurations">
|
||||
return `<script class="hexo-configurations">
|
||||
var NexT = window.NexT || {};
|
||||
var CONFIG = ${JSON.stringify(exportConfig)};
|
||||
</script>`;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user