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}) }}
|
{{ partial('_third-party/index.njk', {}, {cache: theme.cache.enable}) }}
|
||||||
|
|
||||||
{%- if theme.pjax %}
|
{%- if theme.pjax %}
|
||||||
<div id="pjax">
|
<div class="pjax">
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
{% include '_third-party/math/index.njk' %}
|
{% include '_third-party/math/index.njk' %}
|
||||||
{% include '_third-party/quicklink.njk' %}
|
{% include '_third-party/quicklink.njk' %}
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
{{ canonical() }}
|
{{ canonical() }}
|
||||||
|
|
||||||
{# Exports some front-matter variables to Front-End #}
|
{# Exports some front-matter variables to Front-End #}
|
||||||
<script{{ pjax }} id="page-configurations">
|
<script{{ pjax }} class="page-configurations">
|
||||||
// https://hexo.io/docs/variables.html
|
// https://hexo.io/docs/variables.html
|
||||||
CONFIG.page = {
|
CONFIG.page = {
|
||||||
sidebar: {{ page.sidebar | safedump }},
|
sidebar: {{ page.sidebar | safedump }},
|
||||||
|
|||||||
@ -2,11 +2,11 @@
|
|||||||
var pjax = new Pjax({
|
var pjax = new Pjax({
|
||||||
selectors: [
|
selectors: [
|
||||||
'head title',
|
'head title',
|
||||||
'#page-configurations',
|
'.page-configurations',
|
||||||
'.main-inner',
|
'.main-inner',
|
||||||
'.post-toc-wrap',
|
'.post-toc-wrap',
|
||||||
'.languages',
|
'.languages',
|
||||||
'#pjax'
|
'.pjax'
|
||||||
],
|
],
|
||||||
analytics: false,
|
analytics: false,
|
||||||
cacheBust: false,
|
cacheBust: false,
|
||||||
@ -14,7 +14,7 @@ var pjax = new Pjax({
|
|||||||
});
|
});
|
||||||
|
|
||||||
document.addEventListener('pjax:success', () => {
|
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();
|
NexT.boot.refresh();
|
||||||
// Define Motion Sequence & Bootstrap Motion.
|
// Define Motion Sequence & Bootstrap Motion.
|
||||||
if (CONFIG.motion.enable) {
|
if (CONFIG.motion.enable) {
|
||||||
|
|||||||
@ -38,7 +38,7 @@ hexo.extend.helper.register('next_config', function() {
|
|||||||
if (config.search) {
|
if (config.search) {
|
||||||
exportConfig.path = config.search.path;
|
exportConfig.path = config.search.path;
|
||||||
}
|
}
|
||||||
return `<script id="hexo-configurations">
|
return `<script class="hexo-configurations">
|
||||||
var NexT = window.NexT || {};
|
var NexT = window.NexT || {};
|
||||||
var CONFIG = ${JSON.stringify(exportConfig)};
|
var CONFIG = ${JSON.stringify(exportConfig)};
|
||||||
</script>`;
|
</script>`;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user