import { websiteUrl, seoPages, socialImage, testflightUrl, sourceUrl } from '../seo.config.js'; import { films, filmUrl } from '../media.config.js'; const absolute = (path) => new URL(path, websiteUrl).href; const organization = { '@type': 'Organization', '@id': absolute('/#org'), name: 'PulseCanvas', url: absolute('/'), logo: absolute('/images/app-icon.webp'), }; const app = { '@type': 'SoftwareApplication', '@id': absolute('/#app'), name: 'PulseCanvas Studio', url: absolute('/'), description: 'PulseCanvas Studio is a free music visualizer and video maker for Mac, iPhone and iPad. Import a soundtrack, arrange beat-aligned visuals, and export an MP4 with audio, up to 4K at 60 fps.', applicationCategory: 'MultimediaApplication', applicationSubCategory: 'Music visualizer', operatingSystem: 'macOS 14 or later, iOS 18 or later, iPadOS 18 or later, visionOS', processorRequirements: 'Apple silicon (Mac)', isAccessibleForFree: true, offers: { '@type': 'Offer', price: 0, priceCurrency: 'USD' }, downloadUrl: [testflightUrl, absolute('/download/')], author: { '@id': organization['@id'] }, publisher: { '@id': organization['@id'] }, sameAs: [testflightUrl], image: absolute('/images/app-icon.png'), screenshot: absolute('/images/app-studio.webp'), featureList: ['Native Metal visualizers in both editions; additional projectM / MilkDrop community effects in Creators Edition', 'Soundtrack import, scrubbing and loop preview', 'Beat-aligned Studio sequences with individual bar lengths', 'Per-visualizer saved styles', 'Save and reopen projects', 'H.264 MP4 exports with audio, up to 4K and 60 fps', 'Wide, landscape, portrait, phone and square canvases'], }; const video = { '@type': 'VideoObject', '@id': absolute('/watch/walkthrough/#video'), name: 'PulseCanvas Studio tutorial: make your first music video', description: seoPages['/watch/walkthrough/'].description, thumbnailUrl: [absolute('/images/tutorial-v6-poster.webp')], // Date first published on this website, rather than the capture's filesystem timestamp. uploadDate: '2026-10-15T22:00:00Z', duration: 'PT1M17.783S', contentUrl: filmUrl(films.walkthrough), url: absolute('/watch/walkthrough/'), inLanguage: 'en', publisher: { '@id': organization['@id'] }, about: { '@id': app['@id'] }, }; // Questions and answers as the support and compare pages show them, so the FAQ data can't drift from the visible text. const plainText = (markup) => markup.replace(/<[^>]+>/g, '').replace(/&/g, '&').replace(/\s+/g, ' ').trim(); export function supportFaq(html) { const block = html.match(/
([\s\S]*?)<\/p>/g), ([, question, answer]) => ({ question: plainText(question), answer: plainText(answer) }));
}
export function structuredData(path, html = '') {
const page = seoPages[path];
const graph = [organization, { '@type': 'WebSite', '@id': absolute('/#website'), url: absolute('/'), name: 'PulseCanvas Studio', publisher: { '@id': organization['@id'] }, inLanguage: 'en' }, {
'@type': page.video ? 'ItemPage' : path.startsWith('/guides/') && path !== '/guides/' ? 'TechArticle' : 'WebPage',
'@id': absolute(path + '#page'), url: absolute(path), name: page.title, description: page.description,
isPartOf: { '@id': absolute('/#website') }, inLanguage: 'en', publisher: { '@id': organization['@id'] },
primaryImageOfPage: { '@type': 'ImageObject', url: absolute(socialImage.path), width: socialImage.width, height: socialImage.height },
...(path.startsWith('/guides/') && path !== '/guides/' ? { headline: page.title, image: absolute('/images/app-studio.webp'), author: { '@id': organization['@id'] } } : {}),
...(page.video ? { mainEntity: { '@id': video['@id'] } } : { about: { '@id': app['@id'] } }),
}];
graph.push(app);
if (page.video) graph.push(video);
const faq = ['/help/', '/compare/'].includes(path) ? supportFaq(html) : [];
if (faq.length) graph.push({ '@type': 'FAQPage', '@id': absolute(path + '#faq'), url: absolute(path), about: { '@id': app['@id'] }, mainEntity: faq.map(({ question, answer }) => ({ '@type': 'Question', name: question, acceptedAnswer: { '@type': 'Answer', text: answer } })) });
if (path !== '/') {
const crumbs = [{ name: 'Home', path: '/' }];
if (path.startsWith('/guides/') && path !== '/guides/') crumbs.push({ name: 'Guides', path: '/guides/' });
crumbs.push({ name: page.name, path });
graph.push({ '@type': 'BreadcrumbList', itemListElement: crumbs.map((crumb, i) => ({ '@type': 'ListItem', position: i + 1, name: crumb.name, item: absolute(crumb.path) })) });
}
return { '@context': 'https://schema.org', '@graph': graph };
}
export const sitemap = `\n