Skip to content

Papermark is the open-source DocSend alternative and secure data rooms with built-in analytics and custom domains.

feat: add help articles to sitemap

Marc Seitz1a5c18e743d4
diff --git a/app/sitemap.ts b/app/sitemap.ts
index 51392478..4b226040 100644
--- a/app/sitemap.ts
+++ b/app/sitemap.ts
@@ -1,10 +1,16 @@
-import { getPosts, getAlternatives, getPages } from "@/lib/content";
+import {
+ getPosts,
+ getAlternatives,
+ getPages,
+ getHelpArticles,
+} from "@/lib/content";
import { MetadataRoute } from "next";
export default async function sitemap(): Promise<MetadataRoute.Sitemap> {
const posts = await getPosts();
const solutions = await getPages();
const alternatives = await getAlternatives();
+ const helpArticles = await getHelpArticles();
const blogLinks = posts.map((post) => ({
url: `https://www.papermark.io/blog/${post?.data.slug}`,
lastModified: new Date().toISOString().split("T")[0],
@@ -17,6 +23,10 @@ export default async function sitemap(): Promise<MetadataRoute.Sitemap> {
url: `https://www.papermark.io/alternatives/${alternative?.slug}`,
lastModified: new Date().toISOString().split("T")[0],
}));
+ const helpArticleLinks = helpArticles.map((article) => ({
+ url: `https://www.papermark.io/help/article/${article?.data.slug}`,
+ lastModified: new Date().toISOString().split("T")[0],
+ }));
return [
{
@@ -54,5 +64,6 @@ export default async function sitemap(): Promise<MetadataRoute.Sitemap> {
...blogLinks,
...solutionLinks,
...alternativeLinks,
+ ...helpArticleLinks,
];
}
diff --git a/lib/content/index.ts b/lib/content/index.ts
index 1fc29a00..0dde17fb 100644
--- a/lib/content/index.ts
+++ b/lib/content/index.ts
@@ -1,4 +1,4 @@
export { getAlternatives } from "./alternative";
export { getPostsRemote as getPosts } from "./blog";
export { getPages } from "./page";
-export { getHelpPosts } from "./help";
+export { getHelpArticles } from "./help";