mirror of
https://github.com/andwati/personal-website.git
synced 2026-11-23 11:08:47 +00:00
feat: Add Utterances comments to blog posts and update icon dependencies.
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
<script setup lang="ts">
|
||||
const commentsRef = ref<HTMLElement | null>(null);
|
||||
|
||||
onMounted(() => {
|
||||
if (!commentsRef.value) return;
|
||||
|
||||
const script = document.createElement("script");
|
||||
script.src = "https://utteranc.es/client.js";
|
||||
script.setAttribute("repo", "andwati/personal-website");
|
||||
script.setAttribute("issue-term", "pathname");
|
||||
script.setAttribute("theme", "github-dark");
|
||||
script.setAttribute("crossorigin", "anonymous");
|
||||
script.async = true;
|
||||
|
||||
commentsRef.value.appendChild(script);
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div ref="commentsRef" class="mt-12 pt-8 border-t border-(--ui-border)" />
|
||||
</template>
|
||||
@@ -46,6 +46,7 @@ useSeoMeta({
|
||||
|
||||
<div class="prose prose-primary dark:prose-invert max-w-none prose-headings:scroll-mt-20 prose-pre:rounded-xl prose-pre:border prose-pre:border-(--ui-border)">
|
||||
<ContentRenderer :value="post" />
|
||||
<UtterancesComments />
|
||||
</div>
|
||||
</div>
|
||||
</UContainer>
|
||||
|
||||
Reference in New Issue
Block a user