Skip to content

Commit

Permalink
docs: add 'buy us a coffee' link (#1524)
Browse files Browse the repository at this point in the history
  • Loading branch information
ni507 authored Oct 11, 2024
1 parent 9968132 commit 26edf6f
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 0 deletions.
4 changes: 4 additions & 0 deletions docs/docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,10 @@ async function createConfig() {
label: 'Contributing',
sidebarId: 'contributing',
},
{
type: 'custom-coffeeNavbarItem',
position: 'right',
},
{
type: 'custom-versionsNavbarItem',
position: 'right',
Expand Down
11 changes: 11 additions & 0 deletions docs/src/components/NavbarItems/CoffeeNavbarItem/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import React from 'react';
import DefaultNavbarItem from '@theme/NavbarItem/DefaultNavbarItem';

export default function CoffeeNavbarItem(): JSX.Element {
return (
<DefaultNavbarItem
label="☕ Buy us a coffee!"
href="https://github.com/sponsors/riok"
/>
);
}
2 changes: 2 additions & 0 deletions docs/src/theme/NavbarItem/ComponentTypes.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
import ComponentTypes from '@theme-original/NavbarItem/ComponentTypes';
import VersionsNavbarItem from '@site/src/components/NavbarItems/VersionsNavbarItem';
import CoffeeNavbarItem from '@site/src/components/NavbarItems/CoffeeNavbarItem';

// see https://github.com/facebook/docusaurus/issues/7227
export default {
...ComponentTypes,
'custom-coffeeNavbarItem': CoffeeNavbarItem,
'custom-versionsNavbarItem': VersionsNavbarItem,
};

0 comments on commit 26edf6f

Please sign in to comment.