Skip to content

Commit bf8d5ff

Browse files
committed
chore: clean, bump version
1 parent ef90987 commit bf8d5ff

File tree

4 files changed

+15
-20
lines changed

4 files changed

+15
-20
lines changed

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "astro-erudite",
33
"type": "module",
4-
"version": "1.6.2",
4+
"version": "1.6.3",
55
"private": true,
66
"scripts": {
77
"dev": "astro dev",

src/layouts/Layout.astro

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -38,20 +38,3 @@ const { class: className } = Astro.props
3838
</div>
3939
</body>
4040
</html>
41-
42-
<script>
43-
// Why we do this instead of rehype-document:
44-
// - rehype-document adds extra <html> and <head> tags
45-
// - This approach is lightweight and injects CSS only if needed
46-
47-
// Only load KaTeX CSS if there is math on this page
48-
if (document.querySelector('.katex')) {
49-
// Prevent duplicate stylesheet injection
50-
if (!document.querySelector('link[href*="katex.min.css"]')) {
51-
const link = document.createElement('link')
52-
link.rel = 'stylesheet'
53-
link.href = 'https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.css'
54-
document.head.appendChild(link)
55-
}
56-
}
57-
</script>

src/pages/blog/[...id].astro

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -282,3 +282,15 @@ const tocSections = await getTOCSections(currentPostId)
282282
})
283283
</script>
284284
</Layout>
285+
286+
<script>
287+
if (document.querySelector('.katex')) {
288+
if (!document.querySelector('link[href*="katex.min.css"]')) {
289+
const link = document.createElement('link')
290+
link.rel = 'stylesheet'
291+
link.href =
292+
'https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.css'
293+
document.head.appendChild(link)
294+
}
295+
}
296+
</script>

0 commit comments

Comments
 (0)