Skip to content

Commit

Permalink
Feat/seo (#14)
Browse files Browse the repository at this point in the history
  • Loading branch information
RockiRider authored Feb 24, 2024
1 parent b9ff014 commit 73f4cf7
Show file tree
Hide file tree
Showing 8 changed files with 104 additions and 49 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,4 @@ yarn-error.log*

playwright-report
test-results

8 changes: 8 additions & 0 deletions apps/docs/next-sitemap.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/** @type {import('next-sitemap').IConfig} */
module.exports = {
siteUrl: "https://mui-sonner.tsotne.co.uk",
generateRobotsTxt: true, // (optional)
generateIndexSitemap: false,
sitemapSize: 1000,
output: "export",
};
1 change: 1 addition & 0 deletions apps/docs/next.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/** @type {import('next').NextConfig} */

module.exports = {
reactStrictMode: true,
output: "export",
Expand Down
5 changes: 3 additions & 2 deletions apps/docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
"scripts": {
"dev": "next dev",
"build": "next build",
"postbuild": "next-sitemap",
"preview": "npx serve out -p 3000",
"lint": "next lint",
"post-update": "echo \"codesandbox preview only, need an update\" && pnpm update --latest"
"lint": "next lint"
},
"dependencies": {
"@emotion/cache": "latest",
Expand All @@ -21,6 +21,7 @@
"framer-motion": "^11.0.5",
"mui-sonner": "*",
"next": "latest",
"next-sitemap": "^4.2.3",
"react": "latest",
"react-dom": "latest"
},
Expand Down
21 changes: 19 additions & 2 deletions apps/docs/pages/index.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import Container from "@mui/material/Container";
import { Button, Stack } from "@mui/material";
import { Stack } from "@mui/material";
import Intro from "@features/home/Intro";
import { toast } from "mui-sonner";
import ToggleCustomTheme from "@features/theme/ThemeToggle";
import Install from "@features/home/Install";
import Features from "@features/home/Features";
Expand All @@ -10,6 +9,7 @@ import Types from "@features/home/Types";
import Position from "@features/home/Position";
import OtherOptions from "@features/home/OtherOptions";
import Styling from "@features/home/Styling";
import Head from "next/head";

export default function Home({
toggleTheme,
Expand All @@ -20,6 +20,19 @@ export default function Home({
}) {
return (
<Container maxWidth="md">
<Head>
<title>MUI Sonner</title>
<meta
name="description"
content="MUI Sonner - A simple toast library for MUI & React."
/>
<meta name="og:title" content="MUI Sonner" />
<meta
name="og:description"
content="A simple toast library for MUI & React."
/>
<meta name="og:url" content="https://mui-sonner.tsotne.co.uk" />
</Head>
<Stack width={1} alignItems="center" gap={6}>
<Intro />
<Features />
Expand All @@ -37,3 +50,7 @@ export default function Home({
</Container>
);
}

export const getStaticProps = async () => {
return { props: {} };
};
2 changes: 1 addition & 1 deletion apps/docs/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"**/*.ts",
"**/*.tsx",
".next/types/**/*.ts"
],
, ],
"exclude": ["node_modules"]
}

Loading

0 comments on commit 73f4cf7

Please sign in to comment.