Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions packages/web/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
<meta name="twitter:site" content="@audius" />
<meta property="twitter:app:name:iphone" content="Audius Music" />
<meta property="twitter:app:name:googleplay" content="Audius Music" />
<title>Audius — Free Music Streaming for Artists, Labels & Fans</title>
<meta property="helmet" />

<script id="polyfills" type="module" src="/src/polyfills.ts"></script>
Expand Down
43 changes: 39 additions & 4 deletions packages/web/scripts/workers-site/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ function isCrawler(val) {
return false
}
const crawlerTest =
/forcessr|ahrefs(bot|siteaudit)|altavista|baiduspider|bingbot|discordbot|duckduckbot|embedly|facebookexternalhit|gigabot|googlebot|google-inspectiontool|ia_archiver|linkbot|linkedinbot|meta-externalfetcher|msnbot|nextgensearchbot|reaper|slackbot|snap|telegrambot|twitterbot|whatsapp|whatsup|yahoo|yandex|yeti|yodaobot|zend|zoominfobot/i
/forcessr|ahrefs(bot|siteaudit)|altavista|anthropic-ai|baiduspider|bingbot|chatgpt-user|claude-web|cohere-ai|discordbot|duckduckbot|embedly|facebookexternalhit|gigabot|googlebot|google-extended|google-inspectiontool|gptbot|ia_archiver|linkbot|linkedinbot|meta-externalfetcher|msnbot|nextgensearchbot|perplexitybot|reaper|slackbot|snap|telegrambot|twitterbot|whatsapp|whatsup|yahoo|yandex|yeti|yodaobot|zend|zoominfobot/i
return crawlerTest.test(val)
}

Expand Down Expand Up @@ -139,14 +139,49 @@ class SEOHandlerHead {

if (!metadata || !name || !metadata.data || metadata.data.length === 0) {
// We didn't parse this to anything we have custom tags for, so just return the default tags
const tags = `<meta property="og:title" content="Audius - Empowering Creators">
const baseUrl = `https://${self.host}`
const schemaLd = JSON.stringify({
'@context': 'https://schema.org',
'@graph': [
{
'@type': 'Organization',
'@id': `${baseUrl}/#organization`,
name: 'Audius',
url: baseUrl,
sameAs: [
'https://twitter.com/audius',
'https://discord.gg/audius',
'https://github.com/AudiusProject'
]
},
{
'@type': 'WebSite',
'@id': `${baseUrl}/#website`,
url: baseUrl,
name: 'Audius',
publisher: { '@id': `${baseUrl}/#organization` }
},
{
'@type': 'SoftwareApplication',
name: 'Audius',
applicationCategory: 'MusicApplication',
operatingSystem: 'Web, iOS, Android'
}
]
})
const tags = `<title>Audius — Free Music Streaming for Artists, Labels & Fans</title>
<link rel="canonical" href="${baseUrl}/">
<meta property="og:url" content="${baseUrl}/">
<meta property="og:type" content="website">
<meta property="og:title" content="Audius — Free Music Streaming for Artists, Labels & Fans">
<meta name="description" content="Audius is a music streaming and sharing platform that puts power back into the hands of content creators." data-react-helmet="true">
<meta property="og:description" content="Audius is a music streaming and sharing platform that puts power back into the hands of content creators.">
<meta property="og:image" content="https://audius.co/ogImage.jpg">
<meta name="twitter:title" content="Audius - Empowering Creators">
<meta name="twitter:title" content="Audius — Free Music Streaming for Artists, Labels & Fans">
<meta name="twitter:description" content="Audius is a music streaming and sharing platform that puts power back into the hands of content creators.">
<meta name="twitter:image" content="https://audius.co/ogImage.jpg">
<meta name="twitter:image:alt" content="The Audius Platform">`
<meta name="twitter:image:alt" content="The Audius Platform">
<script type="application/ld+json">${schemaLd}</script>`
element.append(tags, { html: true })
return
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import { useState } from 'react'

import { Helmet } from 'react-helmet'

import styles from './FAQ2026.module.css'

/** Inline chevron so we control color (white default, purple on hover) without Harmony theme override */
Expand Down Expand Up @@ -63,8 +65,26 @@ export const FAQ2026 = (_props: FAQ2026Props) => {
})
}

const faqPageSchema = {
'@context': 'https://schema.org',
'@type': 'FAQPage',
mainEntity: faqItems.map((item) => ({
'@type': 'Question',
name: item.question,
acceptedAnswer: {
'@type': 'Answer',
text: item.answer
}
}))
}

return (
<section className={styles.section} aria-labelledby='faq-heading'>
<Helmet encodeSpecialCharacters={false}>
<script type='application/ld+json'>
{JSON.stringify(faqPageSchema)}
</script>
</Helmet>
<div className={styles.container}>
<h2 id='faq-heading' className={styles.headline}>
Frequently Asked Questions
Expand Down
45 changes: 41 additions & 4 deletions packages/web/src/ssr/metaTags.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,43 @@ export const getExploreInfo = (type?: string): ExploreInfo => {
}

/**
* Default meta tag context (homepage / landing)
* GEO: Title and canonical so AI engines and crawlers get strong signals.
* Homepage schema markup for Organization, WebSite, SoftwareApplication
*/
const getHomepageStructuredData = () => {
const publicUrl = getPublicUrl()
return {
'@context': 'https://schema.org',
'@graph': [
{
'@type': 'Organization',
'@id': `${publicUrl}/#organization`,
name: 'Audius',
url: publicUrl,
sameAs: [
'https://twitter.com/audius',
'https://discord.gg/audius',
'https://github.com/AudiusProject'
]
},
{
'@type': 'WebSite',
'@id': `${publicUrl}/#website`,
url: publicUrl,
name: 'Audius',
publisher: { '@id': `${publicUrl}/#organization` }
},
{
'@type': 'SoftwareApplication',
name: 'Audius',
applicationCategory: 'MusicApplication',
operatingSystem: 'Web, iOS, Android'
}
]
}
}

/**
* Default meta tag context
*/
export const getDefaultContext = () => {
const publicUrl = getPublicUrl()
Expand All @@ -108,10 +143,12 @@ export const getDefaultContext = () => {
'Audius is a music streaming and sharing platform that puts power back into the hands of content creators.',
ogDescription:
'Audius is a music streaming and sharing platform that puts power back into the hands of content creators.',
canonicalUrl: `${publicUrl}/`,
image: DEFAULT_IMAGE_URL,
imageAlt: 'The Audius Platform',
thumbnail: true
thumbnail: true,
canonicalUrl: `${publicUrl}/`,
webUrl: `${publicUrl}/`,
structuredData: getHomepageStructuredData()
}
}

Expand Down