Skip to content

Commit

Permalink
add sitemap and google verification code meta tag
Browse files Browse the repository at this point in the history
  • Loading branch information
konstantin-lukas committed Nov 28, 2024
1 parent 455075f commit 6be306b
Show file tree
Hide file tree
Showing 3 changed files with 90 additions and 0 deletions.
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,13 @@ Here's an overview over each page and which files you have to edit to change the
- Legal Notice: `@/app/legal-notice/page.tsx`
- Privacy Policy: `@/app/privacy-policy/page.tsx`

## Google Site Verification
To verify your ownership with Google, put the Google verification code in the metadata inside `@/app/page.tsx`.

## Sitemap
When adding a new route you want to be indexed by Google, add it to the `@/app/sitemap.ts` file. It will be available
under `/sitemap.xml` in production but not in dev mode.

## Deploying
Make sure the `next.config.mjs` and `@/components/shared/BasePathImage.tsx` file contains the correct base path. This is necessary for loading images correctly
on GitHub pages. This needs to be set to `"/alanakbik.github.io"` on forked versions of the repo and be set
Expand Down
6 changes: 6 additions & 0 deletions app/page.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import type { Metadata } from "next";
import React from "react";

import PinnedMessage from "@/components/routes/home/PinnedMessage";
Expand All @@ -11,6 +12,11 @@ import WrapperLarge from "@/components/WrapperLarge";
import TimelineEntries, { PinnedMessages } from "@/content/LatestNews";
import { getCategoryColorMap } from "@/utils";

export const metadata: Metadata = {
verification: {
google: "GOOGLE_SITE_VERIFICATION",
},
};

export default function Page() {

Expand Down
77 changes: 77 additions & 0 deletions app/sitemap.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
import type { MetadataRoute } from "next";

export default function sitemap(): MetadataRoute.Sitemap {
return [
{
url: "https://alanakbik.github.io/",
lastModified: new Date(),
changeFrequency: "yearly",
priority: 0.8,
}, {
url: "https://alanakbik.github.io/research/",
lastModified: new Date(),
changeFrequency: "yearly",
priority: 0.9,
}, {
url: "https://alanakbik.github.io/research/flair",
lastModified: new Date(),
changeFrequency: "yearly",
priority: 0.7,
}, {
url: "https://alanakbik.github.io/research/zitatsuchmaschine",
lastModified: new Date(),
changeFrequency: "yearly",
priority: 0.7,
}, {
url: "https://alanakbik.github.io/research/fundus",
lastModified: new Date(),
changeFrequency: "yearly",
priority: 0.7,
}, {
url: "https://alanakbik.github.io/research/transformer-ranker",
lastModified: new Date(),
changeFrequency: "yearly",
priority: 0.7,
}, {
url: "https://alanakbik.github.io/research/cleanconll",
lastModified: new Date(),
changeFrequency: "yearly",
priority: 0.7,
}, {
url: "https://alanakbik.github.io/research/opiniongpt",
lastModified: new Date(),
changeFrequency: "yearly",
priority: 0.7,
}, {
url: "https://alanakbik.github.io/research/lm-pub-quiz",
lastModified: new Date(),
changeFrequency: "yearly",
priority: 0.7,
}, {
url: "https://alanakbik.github.io/research/noisebench",
lastModified: new Date(),
changeFrequency: "yearly",
priority: 0.7,
}, {
url: "https://alanakbik.github.io/research/zelda",
lastModified: new Date(),
changeFrequency: "yearly",
priority: 0.6,
}, {
url: "https://alanakbik.github.io/publications/",
lastModified: new Date(),
changeFrequency: "yearly",
priority: 1,
}, {
url: "https://alanakbik.github.io/chair/",
lastModified: new Date(),
changeFrequency: "yearly",
priority: 0.8,
}, {
url: "https://alanakbik.github.io/travel/",
lastModified: new Date(),
changeFrequency: "yearly",
priority: 0.5,
},
];
}

0 comments on commit 6be306b

Please sign in to comment.