aboutsummaryrefslogtreecommitdiff
path: root/src/layouts
diff options
context:
space:
mode:
Diffstat (limited to 'src/layouts')
-rw-r--r--src/layouts/BlogSingleLayout.astro6
-rw-r--r--src/layouts/Layout.astro2
2 files changed, 8 insertions, 0 deletions
diff --git a/src/layouts/BlogSingleLayout.astro b/src/layouts/BlogSingleLayout.astro
index 70b62c2..d3396ec 100644
--- a/src/layouts/BlogSingleLayout.astro
+++ b/src/layouts/BlogSingleLayout.astro
@@ -47,6 +47,10 @@ const schema = {
},
},
};
+
+const textToEncode = `${entry.data.title}\r\n\r\n${Astro.url.toString()} por @arielcg@mastodon.social`;
+
+const mastodonShareUrl = `https://share.joinmastodon.org/#text=${encodeURIComponent(textToEncode)}`;
---
<Layout title={entry.data.title} description={entry.data.description}>
@@ -79,6 +83,8 @@ const schema = {
<p>
<a href="/blog/">Volver al blog</a>
+ &nbsp;ยท&nbsp;
+ <a href={mastodonShareUrl} rel="noopener noreferrer">Compartir en Mastodon</a>
</p>
</Layout>
diff --git a/src/layouts/Layout.astro b/src/layouts/Layout.astro
index f484ce8..ebe5917 100644
--- a/src/layouts/Layout.astro
+++ b/src/layouts/Layout.astro
@@ -42,6 +42,8 @@ const { title, description, empty } = Astro.props;
<meta name="twitter:description" content={description} />
<meta name="twitter:image" content="/favicon.png" />
+ <meta name="fediverse:creator" content="@arielcg@mastodon.social" />
+
<title>{title} - Ariel Costas</title>
<slot name="head-jsonld" />