Filename convention to lowercase-with-dash

This commit is contained in:
Riyyi
2025-04-05 12:19:50 +02:00
parent 232dcf5f14
commit 2c58f39f07
16 changed files with 0 additions and 0 deletions
+18
View File
@@ -0,0 +1,18 @@
<template>
<h6>
<span :id="props.id"></span>
<a v-if="props.id && generate" :href="`#${props.id}`">
<slot />
</a>
<slot v-else />
</h6>
</template>
<script setup lang="ts">
import { computed, useRuntimeConfig } from "#imports"
const props = defineProps<{ id?: string }>()
const { headings } = useRuntimeConfig().public.mdc
const generate = computed(() => props.id && ((typeof headings?.anchorLinks === "boolean" && headings?.anchorLinks === true) || (typeof headings?.anchorLinks === "object" && headings?.anchorLinks?.h6)))
</script>