Skip to content

Commit

Permalink
fix(seo): get current hostname/domain from env variables
Browse files Browse the repository at this point in the history
  • Loading branch information
mateusfg7 committed Nov 25, 2023
1 parent 62fb564 commit 1980569
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
UMAMI_WEBSITE_ID=
HOSTNAME=
4 changes: 3 additions & 1 deletion src/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ import './global.css'
const APP_NAME = 'Noisekun'
const APP_DESCRIPTION =
'Listen combinations of ambient sounds for relaxing or getting more productive on your task!'
const APP_URL = 'https://noisekun.mateusf.com'
const APP_URL = process.env.HOSTNAME
? `https://${process.env.HOSTNAME}`
: 'http://localhost:3000'

export const metadata: Metadata = {
metadataBase: new URL(APP_URL),
Expand Down

0 comments on commit 1980569

Please sign in to comment.