-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #34 from firehawk89/add-metadata
Add Metadata
- Loading branch information
Showing
17 changed files
with
1,648 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,4 +7,6 @@ Skauna | |
hookform | ||
sonner | ||
Bootcamp | ||
Udemy | ||
Udemy | ||
Csvg | ||
Cpath |
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import { SITE_URL } from '@/utils' | ||
import { MetadataRoute } from 'next' | ||
|
||
export default function robots(): MetadataRoute.Robots { | ||
return { | ||
rules: { | ||
allow: '/', | ||
userAgent: '*', | ||
}, | ||
sitemap: `${SITE_URL}/sitemap.xml`, | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import { SITE_URL } from '@/utils' | ||
import { getProjectsMetadata } from '@/utils/projects' | ||
import { MetadataRoute } from 'next' | ||
|
||
export default async function sitemap(): Promise<MetadataRoute.Sitemap> { | ||
const projectsMetadata = await getProjectsMetadata() | ||
|
||
const sitemapData: MetadataRoute.Sitemap = [ | ||
{ | ||
changeFrequency: 'monthly', | ||
lastModified: new Date(), | ||
priority: 1, | ||
url: SITE_URL, | ||
}, | ||
] | ||
|
||
for (const project of projectsMetadata) { | ||
sitemapData.push({ | ||
changeFrequency: 'weekly', | ||
lastModified: project.lastModified, | ||
priority: 0.8, | ||
url: `${SITE_URL}/${project.slug}`, | ||
}) | ||
} | ||
|
||
return sitemapData | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
type ProjectMetadata = { | ||
lastModified: Date | ||
slug: string | ||
} | ||
|
||
export default ProjectMetadata |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
export const LINK = { | ||
about: '/#about-me', | ||
contact: '/#contact-me', | ||
index: '/', | ||
projects: '/#my-projects', | ||
} as const | ||
|
||
type Link = keyof typeof LINK | ||
|
||
export default Link |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
export const MOBILE_BREAKPOINT = 767.98 | ||
export const SITE_URL = process.env.SITE_URL || 'http://localhost:3000' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters