diff --git a/astro.config.mjs b/astro.config.mjs
index 832fae6..8648b71 100644
--- a/astro.config.mjs
+++ b/astro.config.mjs
@@ -13,7 +13,7 @@ export default defineConfig({
vite: {
plugins: [tailwindcss()],
},
-
+ site: "https://centrodelreinodepazyjusticia.com/",
//base: '/mockup/',
integrations: [markdoc(), icon(), vue()],
diff --git a/src/components/BaseHead.astro b/src/components/BaseHead.astro
index 21bad6b..51c3763 100644
--- a/src/components/BaseHead.astro
+++ b/src/components/BaseHead.astro
@@ -2,8 +2,14 @@
import { ClientRouter } from "astro:transitions";
import { GoogleAnalytics } from 'astro-google-analytics';
-const { title = "Centro del Reino de Paz y Justicia", description = "" } =
- Astro.props;
+const {
+ title = "Centro del Reino de Paz y Justicia",
+ description = "",
+ image = null,
+ url = null,
+} = Astro.props;
+
+const imageUrl = image ? new URL(image, Astro.site).toString() : null;
---
@@ -13,7 +19,29 @@ const { title = "Centro del Reino de Paz y Justicia", description = "" } =
+
{title}
+
+
+
+
+ {url && }
+
+
+
+
+ {imageUrl && }
+
+
+
+
+
+
+
+
+ {imageUrl && }
+ {url && }
+
\ No newline at end of file
diff --git a/src/components/ShareSticky.vue b/src/components/ShareSticky.vue
index 04c19a6..7903c9d 100644
--- a/src/components/ShareSticky.vue
+++ b/src/components/ShareSticky.vue
@@ -23,11 +23,6 @@
-
-
-
-
-
@@ -60,9 +55,6 @@
-
-
-
@@ -106,9 +98,7 @@ const copyLink = async () => {
console.error("No se pudo copiar")
}
}
-const BASE_URL = typeof window !== "undefined"
- ? `${window.location.protocol}//${window.location.host}`
- : ""
+const BASE_URL = window.location.host
const fullUrl = computed(() => {
if (props.url.startsWith("http")) {
@@ -123,5 +113,4 @@ const twitterUrl = computed(() => `https://twitter.com/intent/tweet?url=${encode
const facebookUrl = computed(() => `https://www.facebook.com/sharer/sharer.php?u=${encodedUrl.value}`)
const whatsappUrl = computed(() => `https://api.whatsapp.com/send?text=${encodedUrl.value}`)
const linkedinUrl = computed(() => `https://www.linkedin.com/sharing/share-offsite/?url=${encodedUrl.value}`)
-const instagramUrl = computed(() => `https://www.instagram.com/centrodelreinodepazyjusticia`)
\ No newline at end of file
diff --git a/src/layouts/MainLayout.astro b/src/layouts/MainLayout.astro
index 43431ac..be44627 100644
--- a/src/layouts/MainLayout.astro
+++ b/src/layouts/MainLayout.astro
@@ -8,7 +8,13 @@ import "@fontsource/poppins/500.css";
import "@fontsource/poppins/700.css";
import "@fontsource-variable/kameron";
import ShareSticky from "../components/ShareSticky.vue";
-const { title } = Astro.props;
+const {
+ title,
+ description,
+ image,
+ url
+} = Astro.props;
+
---
-
+
{Astro.url.pathname.includes('/news/') && (
-
+
)}
diff --git a/src/pages/[locale]/news/[id].astro b/src/pages/[locale]/news/[id].astro
index 56ebe4c..6da5629 100644
--- a/src/pages/[locale]/news/[id].astro
+++ b/src/pages/[locale]/news/[id].astro
@@ -38,7 +38,12 @@ const baseSlug = routeTranslations.news[locale] || routeTranslations.news.en;
---
-
+
diff --git a/src/pages/news/[id].astro b/src/pages/news/[id].astro
index 8c79145..5bede2c 100644
--- a/src/pages/news/[id].astro
+++ b/src/pages/news/[id].astro
@@ -19,15 +19,11 @@ export async function getStaticPaths() {
const { post } = Astro.props;
const { Content } = await render(post);
+console.log("astro site", Astro.site);
const baseUrl = Astro.site ?? "https://mk8nrc8p-4321.brs.devtunnels.ms";
const pageUrl = new URL(`/es/news/${post.id}`, baseUrl).toString();
-const imageUrl = post.data.thumbnail
- ? new URL(post.data.thumbnail.src, baseUrl).toString()
- : null;
-
-const description = `${post.data.title} - ${post.data.city ?? ""} ${post.data.country ?? ""}`;
---