|
| 1 | +// Parity with src/_includes/jsonld.njk. |
| 2 | + |
| 3 | +export const SITE_URL = 'https://flowfuse.com' |
| 4 | +export const OG_IMAGE = `${SITE_URL}/images/og-social-tile.jpg` |
| 5 | + |
| 6 | +const SITE_TAGLINE = 'Build workflows and integrations that optimize your industrial operations' |
| 7 | + |
| 8 | +export function buildJsonLd (opts: { url: string, title: string, description: string, image?: string }) { |
| 9 | + const pageImage = opts.image || OG_IMAGE |
| 10 | + return { |
| 11 | + '@context': 'https://schema.org', |
| 12 | + '@graph': [ |
| 13 | + { |
| 14 | + '@type': 'Organization', |
| 15 | + '@id': `${SITE_URL}/#organization`, |
| 16 | + name: 'FlowFuse', |
| 17 | + url: SITE_URL, |
| 18 | + description: SITE_TAGLINE, |
| 19 | + logo: { '@type': 'ImageObject', url: `${SITE_URL}/handbook/images/logos/ff-logo--square--dark.png` }, |
| 20 | + sameAs: [ |
| 21 | + 'https://www.g2.com/products/flowfuse/reviews', |
| 22 | + 'https://www.linkedin.com/company/flowfuse', |
| 23 | + 'https://www.youtube.com/@FlowFuseInc', |
| 24 | + 'https://github.com/FlowFuse' |
| 25 | + ] |
| 26 | + }, |
| 27 | + { |
| 28 | + '@type': 'WebSite', |
| 29 | + '@id': `${SITE_URL}/#website`, |
| 30 | + url: SITE_URL, |
| 31 | + name: 'FlowFuse', |
| 32 | + description: SITE_TAGLINE, |
| 33 | + publisher: { '@id': `${SITE_URL}/#organization` } |
| 34 | + }, |
| 35 | + { |
| 36 | + '@type': 'WebPage', |
| 37 | + '@id': `${opts.url}#webpage`, |
| 38 | + url: opts.url, |
| 39 | + name: opts.title, |
| 40 | + headline: opts.title, |
| 41 | + description: opts.description, |
| 42 | + isPartOf: { '@id': `${SITE_URL}/#website` }, |
| 43 | + primaryImageOfPage: { '@type': 'ImageObject', url: pageImage }, |
| 44 | + publisher: { '@id': `${SITE_URL}/#organization` } |
| 45 | + }, |
| 46 | + { |
| 47 | + '@type': 'SoftwareApplication', |
| 48 | + '@id': `${SITE_URL}/#software`, |
| 49 | + name: 'FlowFuse', |
| 50 | + url: SITE_URL, |
| 51 | + applicationCategory: 'DeveloperApplication', |
| 52 | + publisher: { '@id': `${SITE_URL}/#organization` }, |
| 53 | + aggregateRating: { |
| 54 | + '@type': 'AggregateRating', |
| 55 | + ratingValue: '4.8', |
| 56 | + ratingCount: '3', |
| 57 | + bestRating: '5', |
| 58 | + worstRating: '0' |
| 59 | + } |
| 60 | + } |
| 61 | + ] |
| 62 | + } |
| 63 | +} |
0 commit comments