Merge pull request #24532 from npiyush97/micrositev3

microsite to v3
This commit is contained in:
Patrik Oldsberg
2024-05-01 17:15:14 +02:00
committed by GitHub
6 changed files with 376 additions and 373 deletions
+1 -1
View File
@@ -52,7 +52,7 @@ Additional steps for the main line release
- Create Release Notes PR
- Add the release note file as [`/docs/releases/vx.y.0.md`](./releases)
- Add an entry to [`/microsite/sidebar.json`](https://github.com/backstage/backstage/blob/master/microsite/sidebars.json) for the release note
- Update the navigation bar item in [`/microsite/docusaurus.config.js`](https://github.com/backstage/backstage/blob/master/microsite/docusaurus.config.js) to point to the new release note
- Update the navigation bar item in [`/microsite/docusaurus.config.ts`](https://github.com/backstage/backstage/blob/master/microsite/docusaurus.config.ts) to point to the new release note
- Finally copy the content, without the metadata header, into the description of the [`Version Packages` Pull Request](https://github.com/backstage/backstage/pulls?q=is%3Aopen+is%3Apr+in%3Atitle+%22Version+Packages)
Once the release has been published edit the newly created release in the [GitHub repository](https://github.com/backstage/backstage/releases) and replace the text content with the release notes.
-349
View File
@@ -1,349 +0,0 @@
/*
* Copyright 2022 The Backstage Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// @ts-check
/** @type{import('prism-react-renderer').PrismTheme} **/
// @ts-ignore
const prismTheme = require('prism-react-renderer/themes/vsDark');
prismTheme.plain.backgroundColor = '#232323';
/** @type {import('@docusaurus/types').Config} */
module.exports = {
title: 'Backstage Software Catalog and Developer Platform',
tagline: 'An open source framework for building developer portals',
url: 'https://backstage.io',
baseUrl: '/',
organizationName: 'Spotify',
projectName: 'backstage',
scripts: [
'https://buttons.github.io/buttons.js',
'https://unpkg.com/medium-zoom@1.0.6/dist/medium-zoom.min.js',
'/js/medium-zoom.js',
'/js/dismissable-banner.js',
'/js/scroll-nav-to-view-in-docs.js',
],
stylesheets: [
'https://fonts.googleapis.com/css?family=IBM+Plex+Mono:500,700&display=swap',
],
favicon: 'img/favicon.ico',
customFields: {
fossWebsite: 'https://spotify.github.io/',
repoUrl: 'https://github.com/backstage/backstage',
},
onBrokenLinks: 'log',
onBrokenMarkdownLinks: 'log',
presets: [
[
'@docusaurus/preset-classic',
/** @type {import('@docusaurus/preset-classic').Options} */
{
docs: {
editUrl: 'https://github.com/backstage/backstage/edit/master/docs/',
path: '../docs',
sidebarPath: 'sidebars.json',
},
blog: {
path: 'blog',
},
theme: {
customCss: 'src/theme/customTheme.scss',
},
gtag: {
trackingID: 'G-KSEVGGNCJW',
},
},
],
],
markdown: {
preprocessor({ fileContent }) {
// Replace all HTML comments with empty strings as these are not supported by MDXv2.
return fileContent.replace(/<!--.*?-->/gs, '');
},
format: 'detect',
},
webpack: {
jsLoader: isServer => ({
loader: require.resolve('swc-loader'),
options: {
jsc: {
parser: {
syntax: 'typescript',
tsx: true,
},
target: 'es2017',
},
module: {
type: isServer ? 'commonjs' : 'es6',
},
},
}),
},
plugins: [
'docusaurus-plugin-sass',
() => ({
name: 'yaml-loader',
configureWebpack() {
return {
module: {
rules: [
{
test: /\.ya?ml$/,
use: 'yaml-loader',
},
],
},
};
},
}),
[
'@docusaurus/plugin-client-redirects',
{
redirects: [
{
from: '/docs',
to: '/docs/overview/what-is-backstage',
},
{
from: '/docs/features/software-catalog/software-catalog-overview',
to: '/docs/features/software-catalog/',
},
{
from: '/docs/features/software-templates/software-templates-index',
to: '/docs/features/software-templates/',
},
{
from: '/docs/features/techdocs/techdocs-overview',
to: '/docs/features/techdocs/',
},
{
from: '/docs/features/kubernetes/overview',
to: '/docs/features/kubernetes/',
},
{
from: '/docs/features/search/search-overview',
to: '/docs/features/search/',
},
{
from: '/docs/getting-started/running-backstage-locally',
to: '/docs/getting-started/',
},
{
from: '/docs/features/software-templates/testing-scaffolder-alpha',
to: '/docs/features/software-templates/migrating-to-rjsf-v5',
},
{
from: '/docs/auth/glossary',
to: '/docs/references/glossary',
},
{
from: '/docs/overview/glossary',
to: '/docs/references/glossary',
},
{
from: '/docs/getting-started/create-an-app',
to: '/docs/getting-started/',
},
{
from: '/docs/getting-started/configuration',
to: '/docs/getting-started/#next-steps',
},
],
},
],
[
'docusaurus-pushfeedback',
{
project: 'q8w1i6cair',
hideIcon: true,
customFont: true,
buttonStyle: 'dark',
},
],
],
themeConfig:
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
{
colorMode: {
defaultMode: 'dark',
disableSwitch: true,
},
navbar: {
logo: {
alt: 'Backstage Software Catalog and Developer Platform',
src: 'img/logo.svg',
},
items: [
{
href: 'https://github.com/backstage/backstage',
label: 'GitHub',
position: 'left',
},
{
to: 'docs/overview/what-is-backstage',
label: 'Docs',
position: 'left',
},
{
to: '/plugins',
label: 'Plugins',
position: 'left',
},
{
to: '/blog',
label: 'Blog',
position: 'left',
},
{
to: 'docs/releases/v1.26.0',
label: 'Releases',
position: 'left',
},
{
to: '/demos',
label: 'Demos',
position: 'left',
},
{
to: '/community',
label: 'Community',
position: 'left',
},
],
},
image: 'img/sharing-opengraph.png',
footer: {
links: [
{
items: [
{
html: `
<a href="/" aria-label="Backstage Home">
<div class="footerLogo"></div>
</a>`,
},
],
},
{
title: 'Docs',
items: [
{
label: 'What is Backstage?',
to: 'docs/overview/what-is-backstage',
},
{
label: 'Getting started',
to: 'docs/getting-started/',
},
{
label: 'Software Catalog',
to: 'docs/features/software-catalog/',
},
{
label: 'Create a Plugin',
to: 'docs/plugins/create-a-plugin',
},
{
label: 'Designing for Backstage',
to: 'docs/dls/design',
},
],
},
{
title: 'Community',
items: [
{
label: 'Support chatroom',
to: 'https://discord.gg/backstage-687207715902193673',
},
{
label: 'Contributing',
to: 'https://github.com/backstage/backstage/blob/master/CONTRIBUTING.md',
},
{
label: 'Adopting',
to: 'https://backstage.spotify.com',
},
{
label: 'Subscribe to our newsletter',
to: 'https://info.backstage.spotify.com/newsletter_subscribe',
},
{
label: 'CNCF Incubation',
to: 'https://www.cncf.io/projects/',
},
],
},
{
title: 'More',
items: [
{
label: 'Open Source @ Spotify',
to: 'https://spotify.github.io/',
},
{
label: 'Spotify Engineering Blog',
to: 'https://engineering.atspotify.com/',
},
{
label: 'Spotify for Developers',
to: 'https://developer.spotify.com/',
},
{
label: 'GitHub',
to: 'https://github.com/backstage/',
},
],
},
],
copyright:
'<p style="text-align:center"><a href="https://spotify.github.io/">Made with ❤️ at Spotify</a></p><p class="copyright">Copyright © 2024 Backstage Project Authors. All rights reserved. The Linux Foundation has registered trademarks and uses trademarks. For a list of trademarks of The Linux Foundation, please see our Trademark Usage page: https://www.linuxfoundation.org/trademark-usage</p>',
},
algolia: {
apiKey: '1f0ba86672ccfc3576faa94583e5b318',
indexName: 'crawler_Backstage Docusaurus 2',
appId: 'JCMFNHCHI8',
searchParameters: {},
},
prism: {
theme: prismTheme,
// Supported languages: https://prismjs.com/#supported-languages
// Default languages: https://github.com/FormidableLabs/prism-react-renderer/blob/master/packages/generate-prism-languages/index.ts#L9-L23
additionalLanguages: ['docker', 'bash'],
magicComments: [
// Extend the default highlight class name
{
className: 'code-block-highlight-line',
line: 'highlight-next-line',
block: { start: 'highlight-start', end: 'highlight-end' },
},
{
className: 'code-block-add-line',
line: 'highlight-add-next-line',
block: { start: 'highlight-add-start', end: 'highlight-add-end' },
},
{
className: 'code-block-remove-line',
line: 'highlight-remove-next-line',
block: {
start: 'highlight-remove-start',
end: 'highlight-remove-end',
},
},
],
},
},
};
+357
View File
@@ -0,0 +1,357 @@
/*
* Copyright 2022 The Backstage Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// @ts-check
/** @type{import('prism-react-renderer').PrismTheme} **/
// @ts-ignore
import { themes } from 'prism-react-renderer';
import type * as Preset from '@docusaurus/preset-classic';
import { Config } from '@docusaurus/types';
const backstageTheme = themes.vsDark;
backstageTheme.plain.backgroundColor = '#232323';
const config: Config = {
title: 'Backstage Software Catalog and Developer Platform',
tagline: 'An open source framework for building developer portals',
url: 'https://backstage.io',
baseUrl: '/',
organizationName: 'Spotify',
projectName: 'backstage',
scripts: [
'https://buttons.github.io/buttons.js',
'https://unpkg.com/medium-zoom@1.0.6/dist/medium-zoom.min.js',
'/js/medium-zoom.js',
'/js/dismissable-banner.js',
'/js/scroll-nav-to-view-in-docs.js',
],
stylesheets: [
'https://fonts.googleapis.com/css?family=IBM+Plex+Mono:500,700&display=swap',
],
favicon: 'img/favicon.ico',
customFields: {
fossWebsite: 'https://spotify.github.io/',
repoUrl: 'https://github.com/backstage/backstage',
},
onBrokenLinks: 'log',
onBrokenMarkdownLinks: 'log',
presets: [
[
'@docusaurus/preset-classic',
/** @type {import('@docusaurus/preset-classic').Options} */
{
docs: {
editUrl: 'https://github.com/backstage/backstage/edit/master/docs/',
path: '../docs',
sidebarPath: 'sidebars.json',
},
blog: {
path: 'blog',
},
theme: {
customCss: 'src/theme/customTheme.scss',
},
gtag: {
trackingID: 'G-KSEVGGNCJW',
},
},
],
],
markdown: {
preprocessor({ fileContent }) {
// Replace all HTML comments with empty strings as these are not supported by MDXv2.
function removeHtmlComments(input) {
let previous;
do {
previous = input;
input = input.replace(/<!--.*?-->/gs, '');
} while (input !== previous);
return input;
}
return removeHtmlComments(fileContent);
},
format: 'detect',
},
webpack: {
jsLoader: isServer => ({
loader: require.resolve('swc-loader'),
options: {
jsc: {
parser: {
syntax: 'typescript',
tsx: true,
},
target: 'es2017',
},
module: {
type: isServer ? 'commonjs' : 'es6',
},
},
}),
},
plugins: [
'docusaurus-plugin-sass',
() => ({
name: 'yaml-loader',
configureWebpack() {
return {
module: {
rules: [
{
test: /\.ya?ml$/,
use: 'yaml-loader',
},
],
},
};
},
}),
[
'@docusaurus/plugin-client-redirects',
{
redirects: [
{
from: '/docs',
to: '/docs/overview/what-is-backstage',
},
{
from: '/docs/features/software-catalog/software-catalog-overview',
to: '/docs/features/software-catalog/',
},
{
from: '/docs/features/software-templates/software-templates-index',
to: '/docs/features/software-templates/',
},
{
from: '/docs/features/techdocs/techdocs-overview',
to: '/docs/features/techdocs/',
},
{
from: '/docs/features/kubernetes/overview',
to: '/docs/features/kubernetes/',
},
{
from: '/docs/features/search/search-overview',
to: '/docs/features/search/',
},
{
from: '/docs/getting-started/running-backstage-locally',
to: '/docs/getting-started/',
},
{
from: '/docs/features/software-templates/testing-scaffolder-alpha',
to: '/docs/features/software-templates/migrating-to-rjsf-v5',
},
{
from: '/docs/auth/glossary',
to: '/docs/references/glossary',
},
{
from: '/docs/overview/glossary',
to: '/docs/references/glossary',
},
{
from: '/docs/getting-started/create-an-app',
to: '/docs/getting-started/',
},
{
from: '/docs/getting-started/configuration',
to: '/docs/getting-started/#next-steps',
},
],
},
],
[
'docusaurus-pushfeedback',
{
project: 'q8w1i6cair',
hideIcon: true,
customFont: true,
buttonStyle: 'dark',
},
],
],
themeConfig: {
colorMode: {
defaultMode: 'dark',
disableSwitch: true,
},
navbar: {
logo: {
alt: 'Backstage Software Catalog and Developer Platform',
src: 'img/logo.svg',
},
items: [
{
href: 'https://github.com/backstage/backstage',
label: 'GitHub',
position: 'left',
},
{
to: 'docs/overview/what-is-backstage',
label: 'Docs',
position: 'left',
},
{
to: '/plugins',
label: 'Plugins',
position: 'left',
},
{
to: '/blog',
label: 'Blog',
position: 'left',
},
{
to: 'docs/releases/v1.26.0',
label: 'Releases',
position: 'left',
},
{
to: '/demos',
label: 'Demos',
position: 'left',
},
{
to: '/community',
label: 'Community',
position: 'left',
},
],
},
image: 'img/sharing-opengraph.png',
footer: {
links: [
{
items: [
{
html: `
<a href="/" aria-label="Backstage Home">
<div class="footerLogo"></div>
</a>`,
},
],
},
{
title: 'Docs',
items: [
{
label: 'What is Backstage?',
to: 'docs/overview/what-is-backstage',
},
{
label: 'Getting started',
to: 'docs/getting-started/',
},
{
label: 'Software Catalog',
to: 'docs/features/software-catalog/',
},
{
label: 'Create a Plugin',
to: 'docs/plugins/create-a-plugin',
},
{
label: 'Designing for Backstage',
to: 'docs/dls/design',
},
],
},
{
title: 'Community',
items: [
{
label: 'Support chatroom',
to: 'https://discord.gg/backstage-687207715902193673',
},
{
label: 'Contributing',
to: 'https://github.com/backstage/backstage/blob/master/CONTRIBUTING.md',
},
{
label: 'Adopting',
to: 'https://backstage.spotify.com',
},
{
label: 'Subscribe to our newsletter',
to: 'https://info.backstage.spotify.com/newsletter_subscribe',
},
{
label: 'CNCF Incubation',
to: 'https://www.cncf.io/projects/',
},
],
},
{
title: 'More',
items: [
{
label: 'Open Source @ Spotify',
to: 'https://spotify.github.io/',
},
{
label: 'Spotify Engineering Blog',
to: 'https://engineering.atspotify.com/',
},
{
label: 'Spotify for Developers',
to: 'https://developer.spotify.com/',
},
{
label: 'GitHub',
to: 'https://github.com/backstage/',
},
],
},
],
copyright: `<p style="text-align:center"><a href="https://spotify.github.io/">Made with ❤️ at Spotify</a></p><p class="copyright">Copyright © ${new Date().getFullYear()} Backstage Project Authors. All rights reserved. The Linux Foundation has registered trademarks and uses trademarks. For a list of trademarks of The Linux Foundation, please see our Trademark Usage page: https://www.linuxfoundation.org/trademark-usage</p>`,
},
algolia: {
apiKey: '1f0ba86672ccfc3576faa94583e5b318',
indexName: 'crawler_Backstage Docusaurus 2',
appId: 'JCMFNHCHI8',
searchParameters: {},
},
prism: {
theme: backstageTheme,
// Supported languages: https://prismjs.com/#supported-languages
// Default languages: https://github.com/FormidableLabs/prism-react-renderer/blob/master/packages/generate-prism-languages/index.ts#L9-L23
additionalLanguages: ['docker', 'bash'],
magicComments: [
// Extend the default highlight class name
{
className: 'code-block-highlight-line',
line: 'highlight-next-line',
block: { start: 'highlight-start', end: 'highlight-end' },
},
{
className: 'code-block-add-line',
line: 'highlight-add-next-line',
block: { start: 'highlight-add-start', end: 'highlight-add-end' },
},
{
className: 'code-block-remove-line',
line: 'highlight-remove-next-line',
block: {
start: 'highlight-remove-start',
end: 'highlight-remove-end',
},
},
],
},
} satisfies Preset.ThemeConfig,
};
export default config;
+4 -2
View File
@@ -22,12 +22,14 @@
"@docusaurus/core": "^3.1.1",
"@docusaurus/plugin-client-redirects": "^3.1.1",
"@docusaurus/preset-classic": "^3.1.1",
"@docusaurus/types": "^3.1.1",
"@mdx-js/react": "^3.0.0",
"@swc/core": "^1.3.46",
"clsx": "^2.0.0",
"docusaurus-plugin-sass": "^0.2.3",
"docusaurus-pushfeedback": "^1.0.0",
"luxon": "^3.0.0",
"prism-react-renderer": "^1.3.5",
"prism-react-renderer": "^2.1.0",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"sass": "^1.57.1",
@@ -35,8 +37,8 @@
},
"devDependencies": {
"@docusaurus/module-type-aliases": "^3.1.1",
"@docusaurus/tsconfig": "^3.1.1",
"@spotify/prettier-config": "^15.0.0",
"@tsconfig/docusaurus": "^2.0.0",
"@types/luxon": "^3.0.0",
"@types/webpack-env": "^1.18.0",
"js-yaml": "^4.1.0",
+1 -1
View File
@@ -1,5 +1,5 @@
{
"extends": "@tsconfig/docusaurus/tsconfig.json",
"extends": "@docusaurus/tsconfig",
"compilerOptions": {
"baseUrl": ".",
"types": [
+13 -20
View File
@@ -2160,7 +2160,14 @@ __metadata:
languageName: node
linkType: hard
"@docusaurus/types@npm:3.2.1":
"@docusaurus/tsconfig@npm:^3.1.1":
version: 3.2.1
resolution: "@docusaurus/tsconfig@npm:3.2.1"
checksum: ea3c28b79b0de069c50f7b3a67d3ff682b6ded2ef02d2c7a4c2eaeddc8fcf79c9d9f5e60fbd2966cf3d247fbb8f63897b80a61fdd8b485c745a12eb684ae241a
languageName: node
linkType: hard
"@docusaurus/types@npm:3.2.1, @docusaurus/types@npm:^3.1.1":
version: 3.2.1
resolution: "@docusaurus/types@npm:3.2.1"
dependencies:
@@ -2842,13 +2849,6 @@ __metadata:
languageName: node
linkType: hard
"@tsconfig/docusaurus@npm:^2.0.0":
version: 2.0.3
resolution: "@tsconfig/docusaurus@npm:2.0.3"
checksum: d8245a64bf131daa0c287649cb9c37ad8fecb2aedea18e15047e0df6463916e5012af3755bd73ecf90999ace1f14a3748a8b3e041d5158e2a85c22a539c649c9
languageName: node
linkType: hard
"@types/acorn@npm:^4.0.0":
version: 4.0.6
resolution: "@types/acorn@npm:4.0.6"
@@ -3847,9 +3847,11 @@ __metadata:
"@docusaurus/module-type-aliases": ^3.1.1
"@docusaurus/plugin-client-redirects": ^3.1.1
"@docusaurus/preset-classic": ^3.1.1
"@docusaurus/tsconfig": ^3.1.1
"@docusaurus/types": ^3.1.1
"@mdx-js/react": ^3.0.0
"@spotify/prettier-config": ^15.0.0
"@swc/core": ^1.3.46
"@tsconfig/docusaurus": ^2.0.0
"@types/luxon": ^3.0.0
"@types/webpack-env": ^1.18.0
clsx: ^2.0.0
@@ -3858,7 +3860,7 @@ __metadata:
js-yaml: ^4.1.0
luxon: ^3.0.0
prettier: ^2.6.2
prism-react-renderer: ^1.3.5
prism-react-renderer: ^2.1.0
react: ^18.0.0
react-dom: ^18.0.0
sass: ^1.57.1
@@ -9583,16 +9585,7 @@ __metadata:
languageName: node
linkType: hard
"prism-react-renderer@npm:^1.3.5":
version: 1.3.5
resolution: "prism-react-renderer@npm:1.3.5"
peerDependencies:
react: ">=0.14.9"
checksum: c18806dcbc4c0b4fd6fd15bd06b4f7c0a6da98d93af235c3e970854994eb9b59e23315abb6cfc29e69da26d36709a47e25da85ab27fed81b6812f0a52caf6dfa
languageName: node
linkType: hard
"prism-react-renderer@npm:^2.3.0":
"prism-react-renderer@npm:^2.1.0, prism-react-renderer@npm:^2.3.0":
version: 2.3.1
resolution: "prism-react-renderer@npm:2.3.1"
dependencies: