Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions apps/dashboard/app/robots.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
User-Agent: *
Disallow: /
1 change: 1 addition & 0 deletions apps/dashboard/middleware.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,5 +83,6 @@ export const config = {
"/(api|trpc)(.*)",
"/((?!.+\\.[\\w]+$|_next).*)",
"/((?!_next/static|_next/image|images|favicon.ico|$).*)",
"/robots.txt",
],
};
13 changes: 0 additions & 13 deletions apps/www/app/policies/[slug]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,19 +25,6 @@ export const generateMetadata = async ({
description: policy.title,
type: "article",
},
robots: {
index: true,
follow: true,
nocache: true,
googleBot: {
index: true,
follow: false,
noimageindex: true,
"max-video-preview": -1,
"max-image-preview": "large",
"max-snippet": -1,
},
},
};
};

Expand Down
3 changes: 3 additions & 0 deletions apps/www/app/robots.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
User-Agent: *
Allow: /
Sitemap: https://unkey.com/sitemap.xml
62 changes: 62 additions & 0 deletions apps/www/app/sitemap.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
import { allChangelogs, allGlossaries, allPolicies, allPosts } from "content-collections";
import type { Changelog, Glossary, Policy, Post } from "content-collections";
import type { MetadataRoute } from "next";
export default async function sitemap(): Promise<MetadataRoute.Sitemap> {
const baseUrl = "https://unkey.com";

const posts: MetadataRoute.Sitemap = allPosts.map((post: Post) => ({
url: `${baseUrl}/blog/${post.slug}`,
lastModified: post.date,
}));

const policies: MetadataRoute.Sitemap = allPolicies.map((policy: Policy) => ({
url: `${baseUrl}/policies/${policy.slug}`,
}));

const changelogs: MetadataRoute.Sitemap = allChangelogs.map((changelog: Changelog) => ({
url: `${baseUrl}/changelog#${changelog.slug}`,
lastModified: changelog.date,
}));

const glossaries: MetadataRoute.Sitemap = allGlossaries.map((glossary: Glossary) => ({
url: `${baseUrl}/glossary/${glossary.slug}`,
lastModified: glossary.updatedAt,
}));

return [
{
url: "https://unkey.com",
lastModified: new Date(),
changeFrequency: "monthly",
priority: 1,
},
{
url: "https://unkey.com/about",
lastModified: new Date(),
changeFrequency: "yearly",
priority: 0.6,
},
{
url: "https://unkey.com/blog",
lastModified: new Date(),
changeFrequency: "weekly",
priority: 1,
},
{
url: "https://unkey.com/changelog",
lastModified: new Date(),
changeFrequency: "monthly",
priority: 1,
},
{
url: "https://unkey.com/glossary",
lastModified: new Date(),
changeFrequency: "weekly",
priority: 1,
},
...posts,
...policies,
...changelogs,
...glossaries,
];
}
2 changes: 1 addition & 1 deletion apps/www/content/blog/how-unkey-treats-marketing.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -225,4 +225,4 @@ You will notice everything is related to feedback and building relationships. Th

## Conclusion

Traditional marketing is dead from Unkey's perspective, and I hope this blog post has helped you understand how we think about marketing and developer relations. If you have any questions, feel free to reach out to me on [X(Twitter)](https://x.com/james_r_perkins) or [Email](james@unkey.dev).
Traditional marketing is dead from Unkey's perspective, and I hope this blog post has helped you understand how we think about marketing and developer relations. If you have any questions, feel free to reach out to me on [X(Twitter)](https://x.com/james_r_perkins).
2 changes: 1 addition & 1 deletion apps/www/content/changelog/2024-03-01.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ You can [check out a demo](https://unkey.com/ratelimit) that shows our synchrono
## Content

- (High requency real-time usage based billing)[https://www.unkey.com/blog/high-frequency-usage-billing]
- (Introducing standalone ratelimiting)[https://www.unkey.com/blog/introducing-standalone-ratelimiting]
- (Introducing standalone ratelimiting)[https://www.unkey.com/blog/introducing-ratelimiting]
4 changes: 4 additions & 0 deletions apps/www/next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ const nextConfig = {
source: "/docs/:match*",
destination: "https://unkey.mintlify.dev/docs/:match*",
},
{
source: "/terms",
destination: "/policies/terms",
},
];
},
async redirects() {
Expand Down