Skip to content
This repository was archived by the owner on Nov 24, 2024. It is now read-only.

Commit

Permalink
fix: Website (#609)
Browse files Browse the repository at this point in the history
  • Loading branch information
reichhartd authored Nov 16, 2024
1 parent 6a51e8c commit 71c5114
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 4 deletions.
2 changes: 2 additions & 0 deletions packages/website/blog/2022-03-30-confession-to-open-source.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ tags: [opensource, reactnative]
A few weeks ago, [Coinpanion](https://en.coinpanion.com/) approached us with a request that accelerated the process of releasing our first open-source package.
I described this journey and our open-source strategy as part of [our new tech blog](https://medium.com/tokenstreet-tech).

<!-- truncate -->

I'm excited to currently have the opportunity to shape the developer culture at tokenstreet.
Cheers to the open-source community and good cooperation!

Expand Down
32 changes: 28 additions & 4 deletions packages/website/docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,30 @@
const lightCodeTheme = require('prism-react-renderer/themes/github');
const darkCodeTheme = require('prism-react-renderer/themes/dracula');

// eslint-disable-next-line @typescript-eslint/explicit-function-return-type
const injectTypeDocSidebar = (items) => {
const modifiedItems = [];
let apiItem;

items.forEach((item) => {
if (item.link?.id === 'api/index') {
apiItem = {
...item,
label: 'API',
items: require('./docs/api/typedoc-sidebar.cjs'),
};
} else {
modifiedItems.push(item);
}
});

// Insert the modified 'api/index' item in the fourth position
if (apiItem) {
modifiedItems.splice(3, 0, apiItem);
}

return modifiedItems;
};
/** @type {import('@docusaurus/types').Config} */
const config = {
title: 'React Native Extended StyleSheet',
Expand Down Expand Up @@ -54,6 +78,9 @@ const config = {
*/
editUrl:
'https://github.com/tokenstreet-tech/react-native-extended-stylesheet/tree/main/packages/website/',
// eslint-disable-next-line @typescript-eslint/explicit-function-return-type
sidebarItemsGenerator: async ({ defaultSidebarItemsGenerator, ...args }) =>
injectTypeDocSidebar(await defaultSidebarItemsGenerator(args)),
},
blog: {
showReadingTime: true,
Expand Down Expand Up @@ -130,13 +157,10 @@ const config = {
// Plugin options
entryPoints: ['../core/src/index.ts'],
tsconfig: '../core/tsconfig.json',
sidebar: {
position: 4,
},
entryDocument: 0,

// TypeDoc options
excludePrivate: true,
readme: 'none',
},
],
],
Expand Down

0 comments on commit 71c5114

Please sign in to comment.