From fa33a33a6abab3f6f387a05c2da920802ecf7fd9 Mon Sep 17 00:00:00 2001 From: Hellgren Heikki Date: Thu, 12 Mar 2026 10:18:45 +0200 Subject: [PATCH] docs: add seo improvements to microsite following the #33200 but adding also LD+JSON data, preconnect for google fonts, robots.txt, and other additional metadata for the page. Signed-off-by: Hellgren Heikki --- microsite/docusaurus.config.ts | 74 ++++++++++++++++++++++++++++++++++ microsite/static/robots.txt | 4 ++ 2 files changed, 78 insertions(+) create mode 100644 microsite/static/robots.txt diff --git a/microsite/docusaurus.config.ts b/microsite/docusaurus.config.ts index ce75a2e063..1c8a88660b 100644 --- a/microsite/docusaurus.config.ts +++ b/microsite/docusaurus.config.ts @@ -63,11 +63,63 @@ const defaultOpenApiOptions = { }, } satisfies OpenApiPlugin.Options; +const seoDescription = + 'Backstage is an open source developer portal framework that centralizes your software catalog, unifies infrastructure tools, and helps teams ship high-quality code faster.'; + +const seoKeywords = [ + 'Backstage', + 'developer portal', + 'internal developer platform', + 'platform engineering', + 'software catalog', + 'software templates', + 'TechDocs', + 'developer experience', + 'IDP', + 'open source', +]; + const config: Config = { title: 'Backstage Software Catalog and Developer Platform', tagline: 'An open source framework for building developer portals', url: 'https://backstage.io', baseUrl: '/', + headTags: [ + { + tagName: 'link', + attributes: { + rel: 'preconnect', + href: 'https://fonts.googleapis.com', + }, + }, + { + tagName: 'link', + attributes: { + rel: 'preconnect', + href: 'https://fonts.gstatic.com', + crossOrigin: 'anonymous', + }, + }, + { + tagName: 'script', + attributes: { + type: 'application/ld+json', + }, + innerHTML: JSON.stringify({ + '@context': 'https://schema.org', + '@type': 'WebSite', + name: 'Backstage', + url: 'https://backstage.io', + description: seoDescription, + image: 'https://backstage.io/img/sharing-opengraph.png', + publisher: { + '@type': 'Organization', + name: 'Spotify', + url: 'https://spotify.github.io/', + }, + }), + }, + ], organizationName: 'Spotify', projectName: 'backstage', scripts: [ @@ -330,6 +382,28 @@ const config: Config = { ], themes: ['docusaurus-theme-openapi-docs'], themeConfig: { + metadata: [ + { + name: 'description', + content: seoDescription, + }, + { + name: 'keywords', + content: seoKeywords.join(', '), + }, + { + property: 'og:site_name', + content: 'Backstage', + }, + { + property: 'og:type', + content: 'website', + }, + { + name: 'twitter:card', + content: 'summary_large_image', + }, + ], languageTabs: [ { highlight: 'javascript', diff --git a/microsite/static/robots.txt b/microsite/static/robots.txt new file mode 100644 index 0000000000..b67550f16d --- /dev/null +++ b/microsite/static/robots.txt @@ -0,0 +1,4 @@ +User-agent: * +Allow: / + +Sitemap: https://backstage.io/sitemap.xml