This commit is contained in:
Luke committed 2023-06-04 15:15:21 +02:00
1 parent 3cebaf7fa5
commit b5eba8423f
229 files changed
+6238 -10690

No files matched your search

+72
View File
@@ -0,0 +1,72 @@
import React from 'react';
import { DocsThemeConfig, useConfig } from 'nextra-theme-docs';
import { useRouter } from 'next/router';
import Search from '@components/Search';
function useHead() {
const { title } = useConfig();
return (
<>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="icon" type="image/x-icon" href="ox.ico" />
<title>{`${title} – Overextended`}</title>
</>
);
}
function useNextSeoProps() {
const path = useRouter().asPath;
const arr = path.split('/');
const title = arr[arr.length - 1].replace(/[-_]/g, ' ');
return {
titleTemplate: /[a-z]/.test(title) && /[A-Z]/.test(title) ? title : '%s',
};
}
const config: DocsThemeConfig = {
logo: (
<div
style={{
paddingLeft: '50px',
lineHeight: '38px',
background: "url('https://avatars.githubusercontent.com/u/88127058?s=38') no-repeat left",
backgroundSize: '38px',
fontWeight: 550,
}}
>
Overextended
</div>
),
project: {
link: 'https://github.com/overextended/docs',
},
chat: {
link: 'https://discord.gg/hmcmv3P7YW',
},
docsRepositoryBase: 'https://github.com/overextended/docs/blob/main',
footer: {
text: 'Overextended',
},
search: {
component: <Search />,
},
head: useHead,
primaryHue: { dark: 200, light: 200 },
sidebar: {
defaultMenuCollapseLevel: 1,
// titleComponent({ title, type }) {
// return (
// <>
// {title[0].toUpperCase()}
// {title.slice(1)}
// </>
// );
// },
},
useNextSeoProps: useNextSeoProps,
};
export default config;