diff options
| author | Ariel Costas Guerrero <ariel@costas.dev> | 2026-03-03 01:32:16 +0100 |
|---|---|---|
| committer | Ariel Costas Guerrero <ariel@costas.dev> | 2026-03-03 01:32:16 +0100 |
| commit | 42edb9a443cc9ea1bf6fe833ee46953a5a3da5f8 (patch) | |
| tree | 6d45e85275860ae140b640a426147a9d0da556fb | |
| parent | 0e11aca148c7049c3a5ac9106fc7622ce6d90e6a (diff) | |
Add Mastodon sharing feature and update footer with Mastodon badge
Squashed commit of the following:
commit 87102bff5e03d689debd14aa91a86074b714cc2f
Author: Ariel Costas Guerrero <ariel@costas.dev>
Date: Tue Mar 3 01:30:20 2026 +0100
Improve sharing message
commit c04a63ebaaea645460780176c6ab6e3783f00362
Author: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Date: Tue Mar 3 00:01:00 2026 +0000
feat: add Mastodon integration (profile badge, share button, fediverse:creator meta tag)
Co-authored-by: arielcostas <94913521+arielcostas@users.noreply.github.com>
commit d2630b4d4ebee0493bfae117d21ce4a2fe78ffaf
Author: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Date: Mon Mar 2 23:56:42 2026 +0000
Initial plan
| -rw-r--r-- | package-lock.json | 26 | ||||
| -rw-r--r-- | src/layouts/BlogSingleLayout.astro | 6 | ||||
| -rw-r--r-- | src/layouts/Layout.astro | 2 | ||||
| -rw-r--r-- | src/partials/Footer.astro | 11 |
4 files changed, 19 insertions, 26 deletions
diff --git a/package-lock.json b/package-lock.json index c162542..1c1a3e8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1410,7 +1410,6 @@ "version": "2.5.1", "resolved": "https://registry.npmjs.org/@parcel/watcher/-/watcher-2.5.1.tgz", "integrity": "sha512-dfUnCxiN9H4ap84DvD2ubjw+3vUNpstxa0TneY/Paat8a3R4uQZDLSvWjmznAY/DoahqTHl9V46HF/Zs3F29pg==", - "dev": true, "hasInstallScript": true, "license": "MIT", "optional": true, @@ -1450,7 +1449,6 @@ "cpu": [ "arm64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -1471,7 +1469,6 @@ "cpu": [ "arm64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -1492,7 +1489,6 @@ "cpu": [ "x64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -1513,7 +1509,6 @@ "cpu": [ "x64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -1534,7 +1529,6 @@ "cpu": [ "arm" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -1555,7 +1549,6 @@ "cpu": [ "arm" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -1576,7 +1569,6 @@ "cpu": [ "arm64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -1597,7 +1589,6 @@ "cpu": [ "arm64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -1618,7 +1609,6 @@ "cpu": [ "x64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -1639,7 +1629,6 @@ "cpu": [ "x64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -1660,7 +1649,6 @@ "cpu": [ "arm64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -1681,7 +1669,6 @@ "cpu": [ "ia32" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -1702,7 +1689,6 @@ "cpu": [ "x64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -2291,7 +2277,6 @@ "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.15.0.tgz", "integrity": "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==", "license": "MIT", - "peer": true, "bin": { "acorn": "bin/acorn" }, @@ -2313,7 +2298,6 @@ "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.18.0.tgz", "integrity": "sha512-PlXPeEWMXMZ7sPYOHqmDyCJzcfNrUr3fGNKtezX14ykXOEIvyK81d+qydx89KY5O71FKMPaQ2vBfBFI5NHR63A==", "license": "MIT", - "peer": true, "dependencies": { "fast-deep-equal": "^3.1.3", "fast-uri": "^3.0.1", @@ -2483,7 +2467,6 @@ "resolved": "https://registry.npmjs.org/astro/-/astro-5.17.3.tgz", "integrity": "sha512-69dcfPe8LsHzklwj+hl+vunWUbpMB6pmg35mACjetxbJeUNNys90JaBM8ZiwsPK689SAj/4Zqb1ayaANls9/MA==", "license": "MIT", - "peer": true, "dependencies": { "@astrojs/compiler": "^2.13.0", "@astrojs/internal-helpers": "0.7.5", @@ -3707,7 +3690,6 @@ "version": "1.0.3", "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-1.0.3.tgz", "integrity": "sha512-pGjwhsmsp4kL2RTz08wcOlGN83otlqHeD/Z5T8GXZB+/YcpQ/dgo+lbU8ZsGxV0HIvqqxo9l7mqYwyYMD9bKDg==", - "dev": true, "license": "Apache-2.0", "optional": true, "bin": { @@ -6152,7 +6134,6 @@ "version": "7.1.1", "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-7.1.1.tgz", "integrity": "sha512-5m3bsyrjFWE1xf7nz7YXdN4udnVtXK6/Yfgn5qnahL6bCkf2yKt4k3nuTKAtT4r3IG8JNR2ncsIMdZuAzJjHQQ==", - "dev": true, "license": "MIT", "optional": true }, @@ -6459,7 +6440,6 @@ "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.8.1.tgz", "integrity": "sha512-UOnG6LftzbdaHZcKoPFtOcCKztrQ57WkHDeRD9t/PTQtmT0NHSeWWepj6pS0z/N7+08BHFDQVUrfmfMRcZwbMg==", "license": "MIT", - "peer": true, "bin": { "prettier": "bin/prettier.cjs" }, @@ -6476,7 +6456,6 @@ "integrity": "sha512-RiBETaaP9veVstE4vUwSIcdATj6dKmXljouXc/DDNwBSPTp8FRkLGDSGFClKsAFeeg+13SB0Z1JZvbD76bigJw==", "devOptional": true, "license": "MIT", - "peer": true, "dependencies": { "@astrojs/compiler": "^2.9.1", "prettier": "^3.0.0", @@ -6973,7 +6952,6 @@ "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.50.1.tgz", "integrity": "sha512-78E9voJHwnXQMiQdiqswVLZwJIzdBKJ1GdI5Zx6XwoFKUIk09/sSrr+05QFzvYb8q6Y9pPV45zzDuYa3907TZA==", "license": "MIT", - "peer": true, "dependencies": { "@types/estree": "1.0.8" }, @@ -7051,7 +7029,6 @@ "integrity": "sha512-fDz1zJpd5GycprAbu4Q2PV/RprsRtKC/0z82z0JLgdytmcq0+ujJbJ/09bPGDxCLkKY3Np5cRAOcWiVkLXJURg==", "devOptional": true, "license": "MIT", - "peer": true, "dependencies": { "chokidar": "^4.0.0", "immutable": "^5.0.2", @@ -7488,7 +7465,6 @@ "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.3.tgz", "integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==", "license": "Apache-2.0", - "peer": true, "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" @@ -7895,7 +7871,6 @@ "resolved": "https://registry.npmjs.org/vite/-/vite-6.4.1.tgz", "integrity": "sha512-+Oxm7q9hDoLMyJOYfUYBuHQo+dkAloi33apOPP56pzj+vsdJDzr+j1NISE5pyaAuKL4A3UD34qd0lx5+kfKp2g==", "license": "MIT", - "peer": true, "dependencies": { "esbuild": "^0.25.0", "fdir": "^6.4.4", @@ -8487,7 +8462,6 @@ "resolved": "https://registry.npmjs.org/zod/-/zod-3.25.76.tgz", "integrity": "sha512-gzUt/qt81nXsFGKIFcC3YnfEAx5NkunCfnDlvuBSSFS02bcXu4Lmea0AFIUwbLWxWPx3d9p8S5QoaujKcNQxcQ==", "license": "MIT", - "peer": true, "funding": { "url": "https://github.com/sponsors/colinhacks" } 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> + ยท + <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" /> diff --git a/src/partials/Footer.astro b/src/partials/Footer.astro index 710006a..4a5cb99 100644 --- a/src/partials/Footer.astro +++ b/src/partials/Footer.astro @@ -32,6 +32,12 @@ import t from "../i18n/es.json"; href="https://github.com/arielcostas/costasdev" >BY-SA 4.0</a > + </article> + + <article id="footer-badge-mastodon"> + <Icon name="tabler:brand-mastodon" /> + <a href="https://mastodon.social/@arielcg" rel="me noopener noreferrer">@arielcg</a> + </article> </section> </footer> @@ -109,5 +115,10 @@ import t from "../i18n/es.json"; background: linear-gradient(to bottom, #333, #000); color: white; } + + #footer-badge-mastodon { + background: linear-gradient(to bottom, #6364ff, #563acc); + color: white; + } } </style> |
