diff options
| author | Dawid Rycerz <dawid@rycerz.xyz> | 2025-07-03 10:56:21 +0300 |
|---|---|---|
| committer | Dawid Rycerz <dawid@rycerz.xyz> | 2025-07-03 10:56:21 +0300 |
| commit | 456cf011b36de91c9936994b1fa45703adcd309b (patch) | |
| tree | 8e60daf998f731ac50d100fa490eaecae1168042 /src/components/blog/webmentions/index.astro | |
Initial fork of chrismwilliams/astro-theme-cactus theme
Diffstat (limited to 'src/components/blog/webmentions/index.astro')
| -rw-r--r-- | src/components/blog/webmentions/index.astro | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/components/blog/webmentions/index.astro b/src/components/blog/webmentions/index.astro new file mode 100644 index 0000000..232b4f3 --- /dev/null +++ b/src/components/blog/webmentions/index.astro @@ -0,0 +1,23 @@ +--- +import { getWebmentionsForUrl } from "@/utils/webmentions"; +import Comments from "./Comments.astro"; +import Likes from "./Likes.astro"; + +const url = new URL(Astro.url.pathname, Astro.site); + +const webMentions = await getWebmentionsForUrl(`${url}`); + +// Return if no webmentions +if (!webMentions.length) return; +--- + +<hr class="border-solid" /> +<h2 class="mb-8 before:hidden">Webmentions for this post</h2> +<div class="space-y-10"> + <Likes mentions={webMentions} /> + <Comments mentions={webMentions} /> +</div> +<p class="mt-8"> + Responses powered by{" "} + <a href="https://webmention.io" rel="noreferrer" target="_blank">Webmentions</a> +</p> |
