Skip to content

Commit

Permalink
fix: add app metadata base
Browse files Browse the repository at this point in the history
  • Loading branch information
DevNono committed Nov 6, 2023
1 parent 6bc2081 commit f6f9a03
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# Tell Node.js that we are in development environment
NODE_ENV=development

# URL
NEXT_PUBLIC_URL=http://localhost:8080

# API URL
NEXT_PUBLIC_API_URL=http://localhost:3000

Expand Down
4 changes: 3 additions & 1 deletion src/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import 'modern-normalize/modern-normalize.css';
import Script from 'next/script';
import { Montserrat, Lexend } from 'next/font/google';
import { Icon } from 'next/dist/lib/metadata/types/metadata-types';
import { url } from 'inspector';

const montserrat = Montserrat({
weight: ['400', '600', '700'],
Expand All @@ -36,10 +37,11 @@ export const metadata: Metadata = {
"Au programme, 7 tournois sur des incontournables de l'esport, du skill, des personnalités et des rencontres, " +
'de nombreuses animations, du cashprize et des lots à gagner, qui rendront cette édition plus intense et vibrante que jamais. ' +
"Alors prépare tout ton stuff et impose-toi dans l'arène !",
metadataBase: new URL(url()!),
openGraph: {
siteName: 'UTT Arena 2023',
title: 'UTT Arena 2023 - 1, 2 et 3 décembre 2023',
url: 'https://arena.utt.fr/',
url: url(),
type: 'website',
images: [
{
Expand Down
1 change: 1 addition & 0 deletions src/utils/environment.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// This file parse and export all environment variables

export const nodeEnv = () => process.env.NODE_ENV;
export const url = () => process.env.NEXT_PUBLIC_URL || '';
export const apiUrl = () => process.env.NEXT_PUBLIC_API_URL || '';
export const uploadsUrl = () => process.env.NEXT_PUBLIC_UPLOADS_URL || '';
// export const googleAnalyticsId = () => process.env.NEXT_PUBLIC_GOOGLE_ANALYTICS_ID || '';
Expand Down

0 comments on commit f6f9a03

Please sign in to comment.