Skip to content

Commit

Permalink
chore: add SiteConfig \& complete metadata, add not-found page, robot…
Browse files Browse the repository at this point in the history
…s.ts and favicon
  • Loading branch information
drondiodev committed Jul 16, 2024
1 parent b2b1319 commit cad3ce4
Show file tree
Hide file tree
Showing 14 changed files with 107 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ yarn-error.log*

# local env files
.env*.local

.env
# vercel
.vercel

Expand Down
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ productivité.
préconfigurés pour maintenir une base de code cohérente et lisible.
- **Husky et Lint-Staged** : Des hooks de Git pour exécuter automatiquement les
vérifications de lint et de formatage avant chaque commit.
- **cz-customizable** : Permet de personnaliser les messages de commit en
utilisant des conventions spécifiques. Il s'intègre avec Commitizen pour
fournir une interface interactive lors de la création de commits, ce qui aide
à maintenir des messages de commit cohérents et significatifs.

## Utilisation

Expand Down
43 changes: 41 additions & 2 deletions app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,51 @@ import type { Metadata } from 'next'
import { Inter } from 'next/font/google'

import './globals.css'
import siteConfig from '@/config/site'

const inter = Inter({ subsets: ['latin'] })

export const metadata: Metadata = {
title: 'Nom du projet',
description: 'Description du projet',
title: {
default: siteConfig.name,
template: `%s | ${siteConfig.name}`,
},
description: siteConfig.description,
keywords: [
'Next.js',
'Tailwind CSS',
'Husky',
'Lint-Staged',
'cz-customizable',
],
authors: [
{
name: 'drondiodev',
url: 'https://github.com/drondiodev',
},
],
creator: 'drondiodev',
openGraph: {
type: 'website',
locale: 'fr_FR',
url: siteConfig.url,
title: siteConfig.name,
description: siteConfig.description,
siteName: siteConfig.name,
},
twitter: {
card: 'summary_large_image',
title: siteConfig.name,
description: siteConfig.description,
images: [`${siteConfig.url}/og`],
creator: 'compte twitter',
},
icons: {
icon: '/favicon.ico',
shortcut: '/favicon-16x16.png',
apple: 'apple-touch-icon.png',
},
// metadataBase: new URL(siteConfig.url),
}

export default function RootLayout({
Expand Down
18 changes: 18 additions & 0 deletions app/not-found.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import Link from 'next/link'

export default function NotFound() {
return (
<section className="grid place-content-center h-screen">
<h1 className="mt-3 text-2xl font-semibold text-gray-800 md:text-3xl">
404 - Page non trouvée
</h1>
<p className="my-4 text-gray-500">Cette page semble ne pas exister !</p>
<Link
href="/"
className="text-primary underline-offset-4 hover:underline"
>
Vers l&apos;accueil
</Link>
</section>
)
}
12 changes: 6 additions & 6 deletions app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ export default function Home() {
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
strokeWidth="2"
strokeLinecap="round"
strokeLinejoin="round"
className="lucide lucide-sparkles "
>
<path d="m12 3-1.912 5.813a2 2 0 0 1-1.275 1.275L3 12l5.813 1.912a2 2 0 0 1 1.275 1.275L12 21l1.912-5.813a2 2 0 0 1 1.275-1.275L21 12l-5.813-1.912a2 2 0 0 1-1.275-1.275L12 3Z" />
Expand All @@ -44,9 +44,9 @@ export default function Home() {
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
strokeWidth="2"
strokeLinecap="round"
strokeLinejoin="round"
className="lucide lucide-arrow-right "
>
<path d="M5 12h14" />
Expand Down
13 changes: 13 additions & 0 deletions app/robots.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import { MetadataRoute } from 'next'

export default function robots(): MetadataRoute.Robots {
return {
rules: {
userAgent: '*',
allow: '/',
disallow: ['/api/', '/_next/', '/public/'],
},
sitemap: 'adresse du site/sitemap.xml',
// fichier sitemap.xml à mettre à la racine de votre projet
}
}
23 changes: 23 additions & 0 deletions config/site.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
type SiteConfig = {
name: string
description: string
url: string
ogImage: string
links: {
twitter: string
github: string
}
}

const siteConfig: SiteConfig = {
name: 'Nom du projet',
description: 'Description de votre projet',
url: 'adresse_web_du_projet',
ogImage: 'adresse_web_du_projet/og',
links: {
twitter: 'lien de votre compte twitter',
github: 'lien de votre compte github',
},
}

export default siteConfig
Binary file added public/android-chrome-192x192.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/android-chrome-512x512.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/apple-touch-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/favicon-16x16.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/favicon-32x32.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/favicon.ico
Binary file not shown.
1 change: 1 addition & 0 deletions public/logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit cad3ce4

Please sign in to comment.