From 084dc2f558088839ee7d824105d264dd9700e116 Mon Sep 17 00:00:00 2001
From: Linden <65407488+thelindat@users.noreply.github.com>
Date: Fri, 9 Jun 2023 18:25:50 +1000
Subject: [PATCH] seo tweaks
---
theme.config.tsx | 22 ++++++++++++----------
1 file changed, 12 insertions(+), 10 deletions(-)
diff --git a/theme.config.tsx b/theme.config.tsx
index 208ee436..b05c2d66 100644
--- a/theme.config.tsx
+++ b/theme.config.tsx
@@ -4,17 +4,27 @@ import { useRouter } from 'next/router';
import Search from '@components/Search';
function useHead() {
+ const { asPath } = useRouter();
+ const { frontMatter, title } = useConfig();
+ const url = `https://overextended.dev${asPath}`;
+ const description = frontMatter.description || "Documentation for Overextended's resources for FiveM/RedM";
+
return (
<>
+
+
+
+
+
>
);
}
function useNextSeoProps() {
- const path = useRouter().asPath;
- const arr = path.split('/');
+ const { asPath } = useRouter();
+ const arr = asPath.split('/');
const title = arr[arr.length - 1].replace(/[-_]/g, ' ');
return {
@@ -53,14 +63,6 @@ const config: DocsThemeConfig = {
primaryHue: { dark: 200, light: 200 },
sidebar: {
defaultMenuCollapseLevel: 1,
- // titleComponent({ title, type }) {
- // return (
- // <>
- // {title[0].toUpperCase()}
- // {title.slice(1)}
- // >
- // );
- // },
},
useNextSeoProps: useNextSeoProps,