From 3bd0aa6f11d488261d416a2d9674896378b43cff Mon Sep 17 00:00:00 2001 From: mansi Date: Sun, 15 Feb 2026 22:39:36 +0530 Subject: [PATCH 1/4] feat: add configurable SEO layer with social metadata support --- index.html | 27 +++++++++++ src/components/SEO.jsx | 100 +++++++++++++++++++++++++++++++++++++++ src/config/seo.config.js | 51 ++++++++++++++++++++ 3 files changed, 178 insertions(+) create mode 100644 src/components/SEO.jsx create mode 100644 src/config/seo.config.js diff --git a/index.html b/index.html index e3bff11..270cea8 100644 --- a/index.html +++ b/index.html @@ -4,10 +4,37 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + GirlsWhoYap Conference diff --git a/src/components/SEO.jsx b/src/components/SEO.jsx new file mode 100644 index 0000000..5bc4522 --- /dev/null +++ b/src/components/SEO.jsx @@ -0,0 +1,100 @@ +import { useEffect } from 'react'; +import { seoConfig } from '../config/seo.config'; + +/** + * SEO Component - Dynamically updates meta tags + * @param {Object} props - SEO properties + * @param {string} props.title - Page title + * @param {string} props.description - Page description + * @param {string} props.image - OG/Twitter image URL + * @param {string} props.url - Canonical URL + * @param {string} props.type - OG type (website, article, etc.) + */ +export default function SEO({ + title, + description, + image, + url, + type = seoConfig.ogType +}) { + const pageTitle = title || seoConfig.title; + const pageDescription = description || seoConfig.description; + const pageImage = image || seoConfig.ogImage; + const pageUrl = url || seoConfig.canonicalUrl; + + // Construct full image URL + const fullImageUrl = pageImage.startsWith('http') + ? pageImage + : `${seoConfig.siteUrl}${pageImage}`; + + // Construct full page URL + const fullPageUrl = pageUrl.startsWith('http') + ? pageUrl + : `${seoConfig.siteUrl}${pageUrl}`; + + useEffect(() => { + // Update document title + document.title = pageTitle; + + // Update or create meta tags + updateMetaTag('description', pageDescription); + updateMetaTag('keywords', seoConfig.keywords); + updateMetaTag('author', seoConfig.author); + updateMetaTag('theme-color', seoConfig.themeColor); + + // Open Graph tags + updateMetaTag('og:title', pageTitle, 'property'); + updateMetaTag('og:description', pageDescription, 'property'); + updateMetaTag('og:image', fullImageUrl, 'property'); + updateMetaTag('og:url', fullPageUrl, 'property'); + updateMetaTag('og:type', type, 'property'); + updateMetaTag('og:site_name', seoConfig.siteName, 'property'); + + // Twitter Card tags + updateMetaTag('twitter:card', seoConfig.twitterCardType); + updateMetaTag('twitter:site', seoConfig.twitterSite); + updateMetaTag('twitter:creator', seoConfig.twitterHandle); + updateMetaTag('twitter:title', pageTitle); + updateMetaTag('twitter:description', pageDescription); + updateMetaTag('twitter:image', fullImageUrl); + + // Canonical URL + updateCanonicalLink(fullPageUrl); + }, [pageTitle, pageDescription, fullImageUrl, fullPageUrl, type]); + + return null; // This component doesn't render anything +} + +/** + * Helper function to update or create meta tags + */ +function updateMetaTag(name, content, attribute = 'name') { + if (!content) return; + + let element = document.querySelector(`meta[${attribute}="${name}"]`); + + if (element) { + element.setAttribute('content', content); + } else { + element = document.createElement('meta'); + element.setAttribute(attribute, name); + element.setAttribute('content', content); + document.head.appendChild(element); + } +} + +/** + * Helper function to update canonical link + */ +function updateCanonicalLink(url) { + let link = document.querySelector('link[rel="canonical"]'); + + if (link) { + link.setAttribute('href', url); + } else { + link = document.createElement('link'); + link.setAttribute('rel', 'canonical'); + link.setAttribute('href', url); + document.head.appendChild(link); + } +} diff --git a/src/config/seo.config.js b/src/config/seo.config.js new file mode 100644 index 0000000..8a5f185 --- /dev/null +++ b/src/config/seo.config.js @@ -0,0 +1,51 @@ +// SEO Configuration for GirlsWhoYap Conference +// Update these values for future conference editions + +export const seoConfig = { + // Basic Info + siteName: "GirlsWhoYap Conference", + title: "GirlsWhoYap Conference", + description: "Where women don't just attend conferences, they shape conversations.", + + // URLs + siteUrl: "https://girlswhoyap.com", // Update with your actual domain + canonicalUrl: "https://girlswhoyap.com", + + // Social Media Images + ogImage: "/logo.png", // Update with actual OG image path (recommended: 1200x630px) + twitterImage: "/logo.png", // Update with actual Twitter card image (recommended: 1200x600px) + + // Social Media Handles + twitterHandle: "@girlswhoyap", // Update with actual Twitter handle + twitterSite: "@girlswhoyap", + + // Additional Meta + keywords: "women in tech, tech conference, girls who yap, women empowerment, tech community", + author: "GirlsWhoYap Team", + themeColor: "#000000", // Update with your brand color + + // Conference Specific + conferenceDate: "2026", // Update for each edition + conferenceLocation: "India", // Update as needed + + // Open Graph Type + ogType: "website", + + // Twitter Card Type + twitterCardType: "summary_large_image", // or "summary" +}; + +// Page-specific SEO overrides +export const pageSEO = { + home: { + title: "GirlsWhoYap Conference - Where Women Shape Conversations", + description: "Join us at GirlsWhoYap Conference where women don't just attend conferences, they shape conversations. Connect, learn, and grow with the tech community.", + path: "/", + }, + events: { + title: "Events - GirlsWhoYap Conference", + description: "Explore all the exciting events, workshops, and sessions at GirlsWhoYap Conference.", + path: "/events", + }, + // Add more pages as needed +}; From d2c9cfc3e584b0bccdc284dfb60f10558bb5d2bb Mon Sep 17 00:00:00 2001 From: mansi <157950124+ruhilmansi@users.noreply.github.com> Date: Sun, 15 Feb 2026 22:45:06 +0530 Subject: [PATCH 2/4] seo --- src/config/seo.config.js | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/src/config/seo.config.js b/src/config/seo.config.js index 8a5f185..58629dd 100644 --- a/src/config/seo.config.js +++ b/src/config/seo.config.js @@ -8,31 +8,31 @@ export const seoConfig = { description: "Where women don't just attend conferences, they shape conversations.", // URLs - siteUrl: "https://girlswhoyap.com", // Update with your actual domain - canonicalUrl: "https://girlswhoyap.com", + siteUrl: "https://preconf.vercel.app/", + canonicalUrl: "https://preconf.vercel.app/", // Social Media Images - ogImage: "/logo.png", // Update with actual OG image path (recommended: 1200x630px) - twitterImage: "/logo.png", // Update with actual Twitter card image (recommended: 1200x600px) + ogImage: "/logo.png", // Update with actual OG image path (1200x630px) + twitterImage: "/logo.png", // Update with actual Twitter card image (1200x600px) // Social Media Handles - twitterHandle: "@girlswhoyap", // Update with actual Twitter handle - twitterSite: "@girlswhoyap", + twitterHandle: "@connectdoradao", + twitterSite: "@connectdoradao", // Additional Meta keywords: "women in tech, tech conference, girls who yap, women empowerment, tech community", - author: "GirlsWhoYap Team", - themeColor: "#000000", // Update with your brand color + author: "GirlsWhoYap", + themeColor: "#000000", // Conference Specific - conferenceDate: "2026", // Update for each edition - conferenceLocation: "India", // Update as needed + conferenceDate: "2026", + conferenceLocation: "India", // Open Graph Type ogType: "website", // Twitter Card Type - twitterCardType: "summary_large_image", // or "summary" + twitterCardType: "summary_large_image", }; // Page-specific SEO overrides @@ -47,5 +47,4 @@ export const pageSEO = { description: "Explore all the exciting events, workshops, and sessions at GirlsWhoYap Conference.", path: "/events", }, - // Add more pages as needed }; From a720915918df6ed5887ead1b1333bf460e3ed793 Mon Sep 17 00:00:00 2001 From: mansi <157950124+ruhilmansi@users.noreply.github.com> Date: Sun, 15 Feb 2026 22:46:43 +0530 Subject: [PATCH 3/4] index --- index.html | 45 +-------------------------------------------- 1 file changed, 1 insertion(+), 44 deletions(-) diff --git a/index.html b/index.html index 270cea8..8b13789 100644 --- a/index.html +++ b/index.html @@ -1,44 +1 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - GirlsWhoYap Conference - - -
- - - + From 120a7d8d91375b4f6fe152d737032a1ffa37dfd6 Mon Sep 17 00:00:00 2001 From: mansi <157950124+ruhilmansi@users.noreply.github.com> Date: Sun, 15 Feb 2026 22:48:13 +0530 Subject: [PATCH 4/4] index --- index.html | 45 ++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 44 insertions(+), 1 deletion(-) diff --git a/index.html b/index.html index 8b13789..13b78a4 100644 --- a/index.html +++ b/index.html @@ -1 +1,44 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GirlsWhoYap Conference + + +
+ + +