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
43 changes: 43 additions & 0 deletions public/dna-social-card.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/dna-social-card.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions src/app/articles/building-a-tone-over-a-career/page.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import type { Metadata } from 'next';
import { PageShell, DocSection, SuedeLink } from '@/components/docs/PageShell';
import { getArticle } from '@/lib/articles-content';
import { DNA_SOCIAL_IMAGE } from '@/lib/seo/social-metadata';

const SITE_URL = process.env.NEXT_PUBLIC_SITE_URL ?? 'https://dna.suedeai.ai';
const SLUG = 'building-a-tone-over-a-career';
Expand All @@ -17,11 +18,13 @@ export const metadata: Metadata = {
siteName: 'Suede DNA',
type: 'article',
publishedTime: article.date,
images: [DNA_SOCIAL_IMAGE],
},
twitter: {
card: 'summary_large_image',
title: `${article.title} — Suede DNA`,
description: article.description,
images: [DNA_SOCIAL_IMAGE.url],
},
};

Expand Down
3 changes: 3 additions & 0 deletions src/app/articles/page.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import type { Metadata } from 'next';
import Link from 'next/link';
import { ARTICLES } from '@/lib/articles-content';
import { DNA_SOCIAL_IMAGE } from '@/lib/seo/social-metadata';

const SITE_URL = process.env.NEXT_PUBLIC_SITE_URL ?? 'https://dna.suedeai.ai';

Expand All @@ -16,12 +17,14 @@ export const metadata: Metadata = {
url: `${SITE_URL}/articles`,
siteName: 'Suede DNA',
type: 'website',
images: [DNA_SOCIAL_IMAGE],
},
twitter: {
card: 'summary_large_image',
title: 'Articles — Suede DNA',
description:
'Essays on rig history, tone genealogy, and the craft of the signal chain — from the Suede DNA archive.',
images: [DNA_SOCIAL_IMAGE.url],
},
};

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import type { Metadata } from 'next';
import { PageShell, DocSection, SuedeLink } from '@/components/docs/PageShell';
import { getArticle } from '@/lib/articles-content';
import { DNA_SOCIAL_IMAGE } from '@/lib/seo/social-metadata';

const SITE_URL = process.env.NEXT_PUBLIC_SITE_URL ?? 'https://dna.suedeai.ai';
const SLUG = 'rig-archaeology-and-the-ear-trained-player';
Expand All @@ -17,11 +18,13 @@ export const metadata: Metadata = {
siteName: 'Suede DNA',
type: 'article',
publishedTime: article.date,
images: [DNA_SOCIAL_IMAGE],
},
twitter: {
card: 'summary_large_image',
title: `${article.title} — Suede DNA`,
description: article.description,
images: [DNA_SOCIAL_IMAGE.url],
},
};

Expand Down
3 changes: 3 additions & 0 deletions src/app/articles/shred-signal-and-the-virtuoso-rig/page.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import type { Metadata } from 'next';
import { PageShell, DocSection, SuedeLink } from '@/components/docs/PageShell';
import { getArticle } from '@/lib/articles-content';
import { DNA_SOCIAL_IMAGE } from '@/lib/seo/social-metadata';

const SITE_URL = process.env.NEXT_PUBLIC_SITE_URL ?? 'https://dna.suedeai.ai';
const SLUG = 'shred-signal-and-the-virtuoso-rig';
Expand All @@ -17,11 +18,13 @@ export const metadata: Metadata = {
siteName: 'Suede DNA',
type: 'article',
publishedTime: article.date,
images: [DNA_SOCIAL_IMAGE],
},
twitter: {
card: 'summary_large_image',
title: `${article.title} — Suede DNA`,
description: article.description,
images: [DNA_SOCIAL_IMAGE.url],
},
};

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import type { Metadata } from 'next';
import { PageShell, DocSection, SuedeLink } from '@/components/docs/PageShell';
import { getArticle } from '@/lib/articles-content';
import { DNA_SOCIAL_IMAGE } from '@/lib/seo/social-metadata';

const SITE_URL = process.env.NEXT_PUBLIC_SITE_URL ?? 'https://dna.suedeai.ai';
const SLUG = 'the-guitar-rig-diagram-as-a-documentary-form';
Expand All @@ -17,11 +18,13 @@ export const metadata: Metadata = {
siteName: 'Suede DNA',
type: 'article',
publishedTime: article.date,
images: [DNA_SOCIAL_IMAGE],
},
twitter: {
card: 'summary_large_image',
title: `${article.title} — Suede DNA`,
description: article.description,
images: [DNA_SOCIAL_IMAGE.url],
},
};

Expand Down
3 changes: 3 additions & 0 deletions src/app/articles/the-unsung-link/page.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import type { Metadata } from 'next';
import { PageShell, DocSection, SuedeLink } from '@/components/docs/PageShell';
import { getArticle } from '@/lib/articles-content';
import { DNA_SOCIAL_IMAGE } from '@/lib/seo/social-metadata';

const SITE_URL = process.env.NEXT_PUBLIC_SITE_URL ?? 'https://dna.suedeai.ai';
const SLUG = 'the-unsung-link';
Expand All @@ -17,11 +18,13 @@ export const metadata: Metadata = {
siteName: 'Suede DNA',
type: 'article',
publishedTime: article.date,
images: [DNA_SOCIAL_IMAGE],
},
twitter: {
card: 'summary_large_image',
title: `${article.title} — Suede DNA`,
description: article.description,
images: [DNA_SOCIAL_IMAGE.url],
},
};

Expand Down
3 changes: 3 additions & 0 deletions src/app/docs/faq/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import type { Metadata } from 'next';
import { PageShell, DocSection, SuedeLink } from '@/components/docs/PageShell';
import { getStats } from '@/lib/manifest';
import { JsonLd } from '@/components/seo/JsonLd';
import { DNA_SOCIAL_IMAGE } from '@/lib/seo/social-metadata';

const SITE_URL = process.env.NEXT_PUBLIC_SITE_URL ?? 'https://dna.suedeai.ai';
const PATH = '/docs/faq';
Expand All @@ -18,12 +19,14 @@ export const metadata: Metadata = {
url: `${SITE_URL}${PATH}`,
siteName: 'Suede DNA',
type: 'article',
images: [DNA_SOCIAL_IMAGE],
},
twitter: {
card: 'summary_large_image',
title: 'FAQ — Suede DNA Docs',
description:
'Common questions about coverage, corrections, image rights, and how to reach the archive if something is wrong.',
images: [DNA_SOCIAL_IMAGE.url],
},
};

Expand Down
3 changes: 3 additions & 0 deletions src/app/docs/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import type { Metadata } from 'next';
import Link from 'next/link';
import { DOCS } from '@/lib/docs-content';
import { IndexCard } from '@/components/docs/IndexCard';
import { DNA_SOCIAL_IMAGE } from '@/lib/seo/social-metadata';

const SITE_URL = process.env.NEXT_PUBLIC_SITE_URL ?? 'https://dna.suedeai.ai';

Expand All @@ -17,12 +18,14 @@ export const metadata: Metadata = {
url: `${SITE_URL}/docs`,
siteName: 'Suede DNA',
type: 'website',
images: [DNA_SOCIAL_IMAGE],
},
twitter: {
card: 'summary_large_image',
title: 'Docs — Suede DNA',
description:
'How Suede DNA is built: sourcing, the manifest pipeline, search syntax, and answers to common questions about the archive.',
images: [DNA_SOCIAL_IMAGE.url],
},
};

Expand Down
3 changes: 3 additions & 0 deletions src/app/docs/search-and-filters/page.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import type { Metadata } from 'next';
import { PageShell, DocSection } from '@/components/docs/PageShell';
import { DNA_SOCIAL_IMAGE } from '@/lib/seo/social-metadata';

const SITE_URL = process.env.NEXT_PUBLIC_SITE_URL ?? 'https://dna.suedeai.ai';
const PATH = '/docs/search-and-filters';
Expand All @@ -16,12 +17,14 @@ export const metadata: Metadata = {
url: `${SITE_URL}${PATH}`,
siteName: 'Suede DNA',
type: 'article',
images: [DNA_SOCIAL_IMAGE],
},
twitter: {
card: 'summary_large_image',
title: 'Search and Filters — Suede DNA Docs',
description:
'How the search box parses names, years, and decades, how ranking works, and how decade filters and sort order combine.',
images: [DNA_SOCIAL_IMAGE.url],
},
};

Expand Down
3 changes: 3 additions & 0 deletions src/app/docs/sourcing-and-verification/page.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import type { Metadata } from 'next';
import { PageShell, DocSection, SuedeLink } from '@/components/docs/PageShell';
import { DNA_SOCIAL_IMAGE } from '@/lib/seo/social-metadata';

const SITE_URL = process.env.NEXT_PUBLIC_SITE_URL ?? 'https://dna.suedeai.ai';
const PATH = '/docs/sourcing-and-verification';
Expand All @@ -16,12 +17,14 @@ export const metadata: Metadata = {
url: `${SITE_URL}${PATH}`,
siteName: 'Suede DNA',
type: 'article',
images: [DNA_SOCIAL_IMAGE],
},
twitter: {
card: 'summary_large_image',
title: 'Sourcing and Verification — Suede DNA Docs',
description:
'Where the rig photos come from, how the manifest is built and validated, and exactly what Suede DNA does and does not verify.',
images: [DNA_SOCIAL_IMAGE.url],
},
};

Expand Down
3 changes: 3 additions & 0 deletions src/app/docs/what-is-suede-dna/page.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import type { Metadata } from 'next';
import { PageShell, DocSection, SuedeLink } from '@/components/docs/PageShell';
import { getStats } from '@/lib/manifest';
import { DNA_SOCIAL_IMAGE } from '@/lib/seo/social-metadata';

const SITE_URL = process.env.NEXT_PUBLIC_SITE_URL ?? 'https://dna.suedeai.ai';
const PATH = '/docs/what-is-suede-dna';
Expand All @@ -17,12 +18,14 @@ export const metadata: Metadata = {
url: `${SITE_URL}${PATH}`,
siteName: 'Suede DNA',
type: 'article',
images: [DNA_SOCIAL_IMAGE],
},
twitter: {
card: 'summary_large_image',
title: 'What Suede DNA Is — Suede DNA Docs',
description:
'The premise behind the archive: why a guitarist’s rigs form a signal chain across time, and how the site is structured around that idea.',
images: [DNA_SOCIAL_IMAGE.url],
},
};

Expand Down
12 changes: 3 additions & 9 deletions src/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { Header } from '@/components/header/Header';
import { Footer } from '@/components/footer/Footer';
import { GridMotif } from '@/components/chrome/GridMotif';
import { getStats } from '@/lib/manifest';
import { DNA_SOCIAL_IMAGE } from '@/lib/seo/social-metadata';
import './globals.css';

const stats = getStats();
Expand Down Expand Up @@ -42,22 +43,15 @@ export const metadata: Metadata = {
siteName: 'Suede DNA',
title: 'Suede DNA — Signal Chains, Archived',
description: defaultDescription,
images: [
{
url: '/opengraph-image',
width: 1200,
height: 630,
alt: 'Suede DNA — a compilation archive of guitarists\' rigs and signal chains',
},
],
images: [DNA_SOCIAL_IMAGE],
},
twitter: {
card: 'summary_large_image',
title: 'Suede DNA — Signal Chains, Archived',
description: defaultDescription,
site: '@AISUEDE',
creator: '@johnnysuede',
images: ['/opengraph-image'],
images: [DNA_SOCIAL_IMAGE.url],
},
robots: {
index: true,
Expand Down
6 changes: 6 additions & 0 deletions src/lib/seo/social-metadata.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
export const DNA_SOCIAL_IMAGE = {
url: '/dna-social-card.webp',
width: 1200,
height: 630,
alt: 'Suede DNA — Signal Chains, Archived',
};
37 changes: 37 additions & 0 deletions tests/lib/social-metadata.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
import { readFileSync } from 'node:fs';
import { resolve } from 'node:path';
import { describe, expect, it } from 'vitest';
import { DNA_SOCIAL_IMAGE } from '@/lib/seo/social-metadata';

const METADATA_PAGES = [
'src/app/docs/page.tsx',
'src/app/docs/search-and-filters/page.tsx',
'src/app/docs/what-is-suede-dna/page.tsx',
'src/app/docs/sourcing-and-verification/page.tsx',
'src/app/docs/faq/page.tsx',
'src/app/articles/page.tsx',
'src/app/articles/rig-archaeology-and-the-ear-trained-player/page.tsx',
'src/app/articles/the-unsung-link/page.tsx',
'src/app/articles/shred-signal-and-the-virtuoso-rig/page.tsx',
'src/app/articles/building-a-tone-over-a-career/page.tsx',
'src/app/articles/the-guitar-rig-diagram-as-a-documentary-form/page.tsx',
] as const;

describe('Suede DNA social metadata', () => {
it('defines a share card at the required dimensions', () => {
expect(DNA_SOCIAL_IMAGE).toMatchObject({
url: '/dna-social-card.webp',
width: 1200,
height: 630,
});
});

it.each(METADATA_PAGES)('%s keeps the shared card when metadata is replaced', (path) => {
const source = readFileSync(resolve(process.cwd(), path), 'utf8');

expect(source).toContain("from '@/lib/seo/social-metadata'");
expect(source).toContain('images: [DNA_SOCIAL_IMAGE]');
expect(source).toContain("card: 'summary_large_image'");
expect(source).toContain('images: [DNA_SOCIAL_IMAGE.url]');
});
});
Loading