|
| 1 | +{% set siteUrl = site.url or "https://nextcommunity.github.io" %} |
| 2 | +{% set pagePath = page.url or "/" %} |
| 3 | +{% set canonicalUrl = siteUrl + pagePath %} |
| 4 | +{% set seoTitle = seo.title or (site.name + " | Open Source Profiles") %} |
| 5 | +{% set seoDescription = seo.description or "Discover and connect with open-source developers in the NextCommunity global talent directory." %} |
| 6 | +{% set seoKeywords = seo.keywords or "developer directory, open source developers, software engineers, github profiles, tech community" %} |
| 7 | +{% set seoType = seo.type or "website" %} |
| 8 | +{% set imagePath = seo.image or site.defaultImage %} |
| 9 | +{% if imagePath and imagePath[0] == "/" %} |
| 10 | + {% set imageUrl = siteUrl + imagePath %} |
| 11 | +{% else %} |
| 12 | + {% set imageUrl = imagePath %} |
| 13 | +{% endif %} |
| 14 | + |
| 15 | +<title>{{ seoTitle | escape }}</title> |
| 16 | +<meta name="description" content="{{ seoDescription | escape }}"> |
| 17 | +<meta name="keywords" content="{{ seoKeywords | escape }}"> |
| 18 | +<meta name="robots" content="index, follow, max-image-preview:large, max-snippet:-1, max-video-preview:-1"> |
| 19 | +<meta name="author" content="{{ (site.author or 'NextCommunity') | escape }}"> |
| 20 | +<meta name="theme-color" content="{{ (site.themeColor or '#2563eb') | escape }}"> |
| 21 | +<link rel="canonical" href="{{ canonicalUrl | escape }}"> |
| 22 | + |
| 23 | +<meta property="og:locale" content="{{ (site.locale or 'en_US') | escape }}"> |
| 24 | +<meta property="og:type" content="{{ seoType | escape }}"> |
| 25 | +<meta property="og:site_name" content="{{ (site.name or 'NextCommunity Developer Directory') | escape }}"> |
| 26 | +<meta property="og:title" content="{{ seoTitle | escape }}"> |
| 27 | +<meta property="og:description" content="{{ seoDescription | escape }}"> |
| 28 | +<meta property="og:url" content="{{ canonicalUrl | escape }}"> |
| 29 | +<meta property="og:image" content="{{ imageUrl | escape }}"> |
| 30 | +<meta property="og:image:alt" content="{{ seoTitle | escape }}"> |
| 31 | + |
| 32 | +<meta name="twitter:card" content="{{ (site.twitterCard or 'summary_large_image') | escape }}"> |
| 33 | +<meta name="twitter:title" content="{{ seoTitle | escape }}"> |
| 34 | +<meta name="twitter:description" content="{{ seoDescription | escape }}"> |
| 35 | +<meta name="twitter:image" content="{{ imageUrl | escape }}"> |
| 36 | + |
| 37 | +<script type="application/ld+json"> |
| 38 | +{ |
| 39 | + "@context": "https://schema.org", |
| 40 | + "@type": "WebSite", |
| 41 | + "name": {{ (site.name or 'NextCommunity Developer Directory') | safeJsonLd | safe }}, |
| 42 | + "url": {{ siteUrl | safeJsonLd | safe }}, |
| 43 | + "inLanguage": {{ ((site.locale or 'en_US') | replace('_', '-')) | safeJsonLd | safe }}, |
| 44 | + "publisher": { |
| 45 | + "@type": "Organization", |
| 46 | + "name": "NextCommunity", |
| 47 | + "url": {{ siteUrl | safeJsonLd | safe }} |
| 48 | + } |
| 49 | +} |
| 50 | +</script> |
| 51 | + |
| 52 | +<script type="application/ld+json"> |
| 53 | +{ |
| 54 | + "@context": "https://schema.org", |
| 55 | + "@type": "WebPage", |
| 56 | + "name": {{ seoTitle | safeJsonLd | safe }}, |
| 57 | + "description": {{ seoDescription | safeJsonLd | safe }}, |
| 58 | + "url": {{ canonicalUrl | safeJsonLd | safe }}, |
| 59 | + "isPartOf": { |
| 60 | + "@type": "WebSite", |
| 61 | + "name": {{ (site.name or 'NextCommunity Developer Directory') | safeJsonLd | safe }}, |
| 62 | + "url": {{ siteUrl | safeJsonLd | safe }} |
| 63 | + }, |
| 64 | + "primaryImageOfPage": { |
| 65 | + "@type": "ImageObject", |
| 66 | + "url": {{ imageUrl | safeJsonLd | safe }} |
| 67 | + } |
| 68 | +} |
| 69 | +</script> |
| 70 | + |
| 71 | +{% if seo.person %} |
| 72 | +<script type="application/ld+json"> |
| 73 | +{ |
| 74 | + "@context": "https://schema.org", |
| 75 | + "@type": "Person", |
| 76 | + "name": {{ seo.person.name | safeJsonLd | safe }}, |
| 77 | + "jobTitle": {{ seo.person.role | safeJsonLd | safe }}, |
| 78 | + "url": {{ canonicalUrl | safeJsonLd | safe }}, |
| 79 | + "sameAs": [ |
| 80 | + {% if seo.person.github %}{{ ("https://github.com/" + seo.person.github) | safeJsonLd | safe }}{% endif %} |
| 81 | + {% if seo.person.github and seo.person.linkedin %},{% endif %} |
| 82 | + {% if seo.person.linkedin %}{{ seo.person.linkedin | safeJsonLd | safe }}{% endif %} |
| 83 | + ] |
| 84 | +} |
| 85 | +</script> |
| 86 | +{% endif %} |
0 commit comments