fix config to support ts imports

Signed-off-by: aramissennyeydd <aramis.sennyey@doordash.com>
This commit is contained in:
aramissennyeydd
2025-02-28 08:25:57 -06:00
parent 8171eb64b5
commit c49e11bd07
2 changed files with 47 additions and 3 deletions
+45 -1
View File
@@ -98,7 +98,7 @@ const config: Config = {
return `https://github.com/backstage/backstage/edit/master/docs/${docPath}`;
},
path: '../docs',
sidebarPath: 'sidebars.js',
sidebarPath: 'sidebars.ts',
...(useVersionedDocs
? {
includeCurrentVersion: true,
@@ -298,6 +298,50 @@ const config: Config = {
],
themes: ['docusaurus-theme-openapi-docs'],
themeConfig: {
languageTabs: [
{
highlight: "javascript",
language: "nodejs",
logoClass: "nodejs",
},
{
highlight: "javascript",
language: "javascript",
logoClass: "javascript",
},
{
highlight: "bash",
language: "curl",
logoClass: "curl",
},
{
highlight: "powershell",
language: "powershell",
logoClass: "powershell",
},
{
highlight: "python",
language: "python",
logoClass: "python",
},
{
highlight: "java",
language: "java",
logoClass: "java",
variant: "unirest",
},
{
highlight: "go",
language: "go",
logoClass: "go",
},
{
highlight: "rust",
language: "rust",
logoClass: "rust",
},
],
colorMode: {
defaultMode: 'dark',
disableSwitch: true,
@@ -1,4 +1,4 @@
const { releases } = require('./releases');
import { releases } from './releases';
function tryToLoadCustomSidebar(ref) {
try {
@@ -15,7 +15,7 @@ const searchSidebar = tryToLoadCustomSidebar(
'../docs/features/search/api/sidebar.ts',
);
module.exports = {
export default {
docs: {
Overview: [
'overview/what-is-backstage',