diff options
Diffstat (limited to 'astro.config.mjs')
| -rw-r--r-- | astro.config.mjs | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/astro.config.mjs b/astro.config.mjs index bc9c803..35bdd2a 100644 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -387,17 +387,6 @@ export default defineConfig({ }, { tag: "script", - attrs: { - src: "https://cdn.jsdelivr.net/npm/mermaid@11/dist/mermaid.min.js", - }, - }, - { - tag: "script", - content: - "document.addEventListener('DOMContentLoaded', () => { mermaid.initialize({ startOnLoad: false, theme: 'default' }); document.querySelectorAll('pre code.language-mermaid').forEach(el => { const pre = el.parentElement; pre.classList.add('mermaid'); pre.innerHTML = el.textContent; }); mermaid.run(); });", - }, - { - tag: "script", content: "document.addEventListener('DOMContentLoaded', () => { document.querySelectorAll('.sl-markdown-content h2[id], .sl-markdown-content h3[id]').forEach(h => { const a = document.createElement('a'); a.href = '#' + h.id; a.className = 'heading-anchor'; a.innerHTML = '<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71\"/><path d=\"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71\"/></svg>'; a.title = 'クリックでこの見出しのURLをコピー'; a.addEventListener('click', e => { e.preventDefault(); const url = location.origin + location.pathname + '#' + h.id; navigator.clipboard.writeText(url).then(() => { a.classList.add('copied'); a.title = 'コピーしました!'; setTimeout(() => { a.classList.remove('copied'); a.title = 'クリックでこの見出しのURLをコピー'; }, 2000); }); }); h.prepend(a); }); });", }, |
