chore: bump vitepress

This commit is contained in:
taskylizard 2023-12-21 12:01:37 +00:00
parent ee98cac837
commit 78b517244e
No known key found for this signature in database
GPG Key ID: 1820131ED1A24120
4 changed files with 5 additions and 69 deletions

View File

@ -1,4 +1,3 @@
import { fileURLToPath } from "node:url";
import { defineConfig } from "vitepress"; import { defineConfig } from "vitepress";
import UnoCSS from "unocss/vite"; import UnoCSS from "unocss/vite";
import { presetUno, presetAttributify, presetIcons } from "unocss"; import { presetUno, presetAttributify, presetIcons } from "unocss";
@ -69,16 +68,6 @@ export default defineConfig({
// Shut the fuck up // Shut the fuck up
chunkSizeWarningLimit: Number.POSITIVE_INFINITY, chunkSizeWarningLimit: Number.POSITIVE_INFINITY,
}, },
resolve: {
alias: [
{
find: /^.*VPSwitchAppearance\.vue$/,
replacement: fileURLToPath(
new URL("./theme/components/ThemeSwitch.vue", import.meta.url),
),
},
],
},
}, },
markdown: { markdown: {
config(md) { config(md) {

View File

@ -1,53 +0,0 @@
<script setup lang="ts">
import { inject } from "vue";
import { useData } from "vitepress";
import VPIconMoon from "vitepress/dist/client/theme-default/components/icons/VPIconMoon.vue";
import VPIconSun from "vitepress/dist/client/theme-default/components/icons/VPIconSun.vue";
const { isDark } = useData();
const toggleAppearance = inject("toggle-appearance", () => {
isDark.value = !isDark.value;
});
</script>
<template>
<button
type="button"
role="switch"
title="Toggle dark mode"
class="VPSwitchAppearance"
:aria-checked="isDark"
@click="toggleAppearance">
<ClientOnly>
<Transition name="fade" mode="out-in">
<VPIconSun v-if="!isDark" class="sun" />
<VPIconMoon v-else class="moon" />
</Transition>
</ClientOnly>
</button>
</template>
<style scoped>
.VPSwitchAppearance {
display: flex;
justify-content: center;
align-items: center;
width: 36px;
height: 36px;
color: var(--vp-c-text-2);
transition: color 0.5s;
&:hover {
color: var(--vp-c-text-1);
transition: color 0.25s;
}
& > :deep(svg) {
width: 20px;
height: 20px;
fill: currentColor;
}
}
</style>

View File

@ -24,7 +24,7 @@
"nprogress": "^0.2.0", "nprogress": "^0.2.0",
"pathe": "^1.1.1", "pathe": "^1.1.1",
"unocss": "^0.57.1", "unocss": "^0.57.1",
"vitepress": "npm:@taskylizard/vitepress@1.0.1", "vitepress": "npm:@taskylizard/vitepress@1.0.2",
"vue": "^3.3.7", "vue": "^3.3.7",
"x-satori": "^0.1.5", "x-satori": "^0.1.5",
"zod": "^3.22.4" "zod": "^3.22.4"

View File

@ -30,8 +30,8 @@ dependencies:
specifier: ^0.57.1 specifier: ^0.57.1
version: 0.57.1(postcss@8.4.32)(vite@4.5.0) version: 0.57.1(postcss@8.4.32)(vite@4.5.0)
vitepress: vitepress:
specifier: npm:@taskylizard/vitepress@1.0.1 specifier: npm:@taskylizard/vitepress@1.0.2
version: /@taskylizard/vitepress@1.0.1(@types/node@20.8.9)(nprogress@0.2.0)(postcss@8.4.32)(search-insights@2.9.0)(typescript@5.2.2) version: /@taskylizard/vitepress@1.0.2(@types/node@20.8.9)(nprogress@0.2.0)(postcss@8.4.32)(search-insights@2.9.0)(typescript@5.2.2)
vue: vue:
specifier: ^3.3.7 specifier: ^3.3.7
version: 3.3.7(typescript@5.2.2) version: 3.3.7(typescript@5.2.2)
@ -1714,8 +1714,8 @@ packages:
- supports-color - supports-color
dev: true dev: true
/@taskylizard/vitepress@1.0.1(@types/node@20.8.9)(nprogress@0.2.0)(postcss@8.4.32)(search-insights@2.9.0)(typescript@5.2.2): /@taskylizard/vitepress@1.0.2(@types/node@20.8.9)(nprogress@0.2.0)(postcss@8.4.32)(search-insights@2.9.0)(typescript@5.2.2):
resolution: {integrity: sha512-GOgu4X0ltZgQoCMiLjq+3eDKXlSeurtaATJj/zJYF44tOtFOp6kOWdx+h3hu82BfDdYAKc71TTt4edLUe+KDHA==} resolution: {integrity: sha512-u5QZDff8VRDV7LP8U9/IDDbMNrCn524uD4jr77wj7LGHs2KT5B6psZUGsEs54FEfdNT+8P1Fh+0hNjGU4jAarg==}
hasBin: true hasBin: true
peerDependencies: peerDependencies:
markdown-it-mathjax3: ^4.3.2 markdown-it-mathjax3: ^4.3.2