From cc63ea24f427ef5cdd98d738895cc3feb8ef7ae7 Mon Sep 17 00:00:00 2001 From: Paulina Tirante Date: Thu, 21 Aug 2025 13:33:18 -0300 Subject: [PATCH 1/3] Cambios en descripcion y FAQ --- src/templates/LandingPage.js | 72 ++++++++++++++++++++++++++++++------ 1 file changed, 60 insertions(+), 12 deletions(-) diff --git a/src/templates/LandingPage.js b/src/templates/LandingPage.js index 944cbc5..2b414d1 100644 --- a/src/templates/LandingPage.js +++ b/src/templates/LandingPage.js @@ -1,14 +1,50 @@ import React, { useRef } from "react" import { graphql } from "gatsby" +import PropTypes from "prop-types" +import { Helmet } from "react-helmet" import Layout from "../components/layout" import { CustomSection, Seo, Navigation } from "../components/index" -import PropTypes from "prop-types" const LandingPage = ({ data, location }) => { const { name, slug, parent_page, seo, body, navigation } = data?.allStrapiLandingPage?.nodes[0] || {} const wrapperRef = useRef(null) + + // ---- FAQs (MISMA LÓGICA QUE ESPAÑOL) ---- + const faqs = (body || []) + .filter(block => block.strapi_component === "components.banner-list") + .flatMap(block => + (block.Card || []) + .filter(card => card.description && card.description.trim() !== "") + .map(({ id, title, description }) => ({ + "@type": "Question", + name: title, + acceptedAnswer: { + "@type": "Answer", + text: description, + }, + "@id": `#faq-${id}`, + })) + ) + + const pageLd = { + "@context": "https://schema.org", + "@type": "WebPage", + name: seo?.pageTitle || name, + description: seo?.pageDescription, + url: `https://en.bitlogic.io/${slug}`, + } + + const faqLd = + faqs.length > 0 + ? { + "@context": "https://schema.org", + "@type": "FAQPage", + mainEntity: faqs, + } + : null + const landing = { name, slug, @@ -16,11 +52,24 @@ const LandingPage = ({ data, location }) => { ref: wrapperRef, } - const {pageTitle, pageKeywords, pageDescription } = seo || {} - return ( - + + + + {faqLd && ( + + )} + + {body?.length > 0 && navigation ? ( <> @@ -49,7 +98,7 @@ LandingPage.propTypes = { name: PropTypes.string.isRequired, body: PropTypes.arrayOf(PropTypes.object), seo: PropTypes.shape({ - pageTitle: PropTypes.string, + pageTitle: PropTypes.string.isRequired, pageDescription: PropTypes.string.isRequired, pageKeywords: PropTypes.string, }), @@ -234,14 +283,13 @@ export const query = graphql` slug } } - arrayButtons { - content - - english_landing_page { - id - slug - } + arrayButtons { + content + english_landing_page { + id + slug } + } backgroundImageDark { url } From 07905b716893fbf184334fc91f88ec07da8c8f85 Mon Sep 17 00:00:00 2001 From: Paulina Tirante Date: Thu, 21 Aug 2025 13:34:13 -0300 Subject: [PATCH 2/3] cambio --- src/templates/LandingPage.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/templates/LandingPage.js b/src/templates/LandingPage.js index 2b414d1..6a2c873 100644 --- a/src/templates/LandingPage.js +++ b/src/templates/LandingPage.js @@ -10,8 +10,6 @@ const LandingPage = ({ data, location }) => { data?.allStrapiLandingPage?.nodes[0] || {} const wrapperRef = useRef(null) - - // ---- FAQs (MISMA LÓGICA QUE ESPAÑOL) ---- const faqs = (body || []) .filter(block => block.strapi_component === "components.banner-list") .flatMap(block => From 9ca9ec96d3096606aab3eebf7a9b1662e041f466 Mon Sep 17 00:00:00 2001 From: Paulina Tirante Date: Thu, 21 Aug 2025 13:37:45 -0300 Subject: [PATCH 3/3] cambio 2 --- src/templates/LandingPage.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/templates/LandingPage.js b/src/templates/LandingPage.js index 6a2c873..f5e5e13 100644 --- a/src/templates/LandingPage.js +++ b/src/templates/LandingPage.js @@ -5,10 +5,10 @@ import { Helmet } from "react-helmet" import Layout from "../components/layout" import { CustomSection, Seo, Navigation } from "../components/index" + const LandingPage = ({ data, location }) => { const { name, slug, parent_page, seo, body, navigation } = data?.allStrapiLandingPage?.nodes[0] || {} - const wrapperRef = useRef(null) const faqs = (body || []) .filter(block => block.strapi_component === "components.banner-list")