Improved SEO, less Git hub actions runs

main
Guus van Meerveld 3 years ago
parent 812772fb49
commit 71c1e38d22
Signed by: Guusvanmeerveld
GPG Key ID: 2BA7D7912771966E

@ -4,6 +4,14 @@ on:
push: push:
branches: branches:
- master - master
paths:
- src/**
- public/**
- Dockerfile
- package.json
- tsconfig.json
- next.config.js
- .github/workflows/**
jobs: jobs:
test: test:

@ -11,5 +11,5 @@ module.exports = {
NEXT_PUBLIC_GITHUB_URL: "https://github.com/Guusvanmeerveld/MaterialTube" NEXT_PUBLIC_GITHUB_URL: "https://github.com/Guusvanmeerveld/MaterialTube"
}, },
basePath: process.env.BASE_PATH ?? "", basePath: process.env.BASE_PATH ?? "",
trailingSlash: true trailingSlash: !(process.env.CI == "true")
}; };

@ -5,7 +5,11 @@ import type { DefaultSeoProps } from "next-seo";
const SEO: DefaultSeoProps = { const SEO: DefaultSeoProps = {
titleTemplate: `%s | ${packageInfo.displayName}`, titleTemplate: `%s | ${packageInfo.displayName}`,
defaultTitle: packageInfo.displayName, defaultTitle: packageInfo.displayName,
description: packageInfo.description description: packageInfo.description,
openGraph: {
description: packageInfo.displayName,
site_name: packageInfo.displayName
}
}; };
export default SEO; export default SEO;

@ -9,7 +9,10 @@ import Layout from "@components/Layout";
const NotFound: NextPage = () => { const NotFound: NextPage = () => {
return ( return (
<> <>
<NextSeo title="Not Found" /> <NextSeo
title="Not Found"
description="The page may have been moved or deleted"
/>
<Layout> <Layout>
<Box sx={{ mt: 5, textAlign: "center" }}> <Box sx={{ mt: 5, textAlign: "center" }}>
<Typography variant="h3">Page not found</Typography> <Typography variant="h3">Page not found</Typography>

@ -14,7 +14,7 @@ import Layout from "@components/Layout";
const Index: NextPage = () => ( const Index: NextPage = () => (
<> <>
<NextSeo title="Home" /> <NextSeo title="Home" description={packageInfo.description} />
<Layout> <Layout>
<Box <Box
sx={{ sx={{

@ -52,7 +52,10 @@ const Trending: NextPage = () => {
return ( return (
<> <>
<NextSeo title="Trending" /> <NextSeo
title="Trending"
description="Look at new and trending video's"
/>
<Layout> <Layout>
<Box sx={{ px: { xs: 1, sm: 2, md: 5 } }}> <Box sx={{ px: { xs: 1, sm: 2, md: 5 } }}>
{isLoading && <Loading />} {isLoading && <Loading />}

Loading…
Cancel
Save