-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
## Feature: Implement Changelog System This pull request introduces a new changelog system to track and display updates and changes made to the application. **Key changes:** * **Changelog Content:** Added MDX files for each changelog entry, allowing for rich formatting and content organization. * **Changelog Page:** Created a dedicated page to display the changelog entries, sorted by date. * **Navigation:** Added changelog links to the header and sidebar navigation for easy access. * **Data Fetching:** Implemented functions to fetch and parse changelog data from the MDX files. * **Validation:** Included validation for changelog metadata using Zod schemas to ensure data consistency. * **Styling:** Designed the changelog page and individual entries with clear and consistent styling. **Additional notes:** * The changelog system is easily extendable to accommodate future updates. * This PR includes minor bug fixes and improvements to existing components. **Testing:** * Manually tested the changelog page and navigation functionality. **Screenshot:** 
- Loading branch information
Showing
18 changed files
with
198 additions
and
21 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
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,76 @@ | ||
import { | ||
WebPageHeader, | ||
WebPageWrapper, | ||
} from "@/app/(web)/_components/general-components"; | ||
import { | ||
Card, | ||
CardContent, | ||
CardDescription, | ||
CardHeader, | ||
CardTitle, | ||
} from "@/components/ui/card"; | ||
import { siteConfig } from "@/config/site"; | ||
import { getChangelogs } from "@/server/actions/changelog"; | ||
import { format } from "date-fns"; | ||
import Image from "next/image"; | ||
|
||
export const dynamic = "force-static"; | ||
|
||
export default async function ChangeLogPage() { | ||
//filter changelogs by date | ||
const changelogs = (await getChangelogs()).sort( | ||
(a, b) => | ||
Number(new Date(b.metaData.publishedAt)) - | ||
Number(new Date(a.metaData.publishedAt)), | ||
); | ||
|
||
return ( | ||
<WebPageWrapper> | ||
<WebPageHeader title="Change Log"> | ||
<p className="text-center text-base"> | ||
<span> | ||
All the latest features, fixes and work to{" "} | ||
{siteConfig.name}. | ||
</span> | ||
</p> | ||
</WebPageHeader> | ||
<div className="grid w-full max-w-4xl gap-8"> | ||
{changelogs.map((changelog) => ( | ||
<ChangeLogCard | ||
key={changelog.metaData.slug} | ||
{...changelog} | ||
/> | ||
))} | ||
</div> | ||
</WebPageWrapper> | ||
); | ||
} | ||
|
||
type ChangeLogCardProps = Awaited<ReturnType<typeof getChangelogs>>[number]; | ||
|
||
function ChangeLogCard({ metaData, content }: ChangeLogCardProps) { | ||
return ( | ||
<Card className="overflow-hidden"> | ||
<div className="relative h-[400px] w-full"> | ||
<Image | ||
src={metaData.thumbnail} | ||
alt={metaData.title} | ||
fill | ||
className="object-cover" | ||
/> | ||
</div> | ||
<CardHeader> | ||
<CardTitle className="text-3xl">v{metaData.version}</CardTitle> | ||
<CardTitle className="text-xl">{metaData.title}</CardTitle> | ||
<CardDescription>{metaData.description}</CardDescription> | ||
</CardHeader> | ||
<CardContent> | ||
<p className="text-muted-foreground"> | ||
Published on {format(new Date(metaData.publishedAt), "PPP")} | ||
</p> | ||
|
||
{content} | ||
</CardContent> | ||
</Card> | ||
); | ||
} |
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
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,22 @@ | ||
--- | ||
title: "Launch of RapidLaunch" | ||
slug: "launch-of-rapidlaunch" | ||
description: "RapidLaunch is a platform to create and launch SaaS products quickly." | ||
version: "0.0.0" | ||
publishedAt: 2024-04-01 | ||
thumbnail: "https://fakeimg.pl/896x400/d1d1d1/6b6b6b" | ||
--- | ||
|
||
You can now change the monitors visibility to public. This will allow you to | ||
share the monitor's metrics _(the overview page)_ with your users. The period is | ||
restricted to **1d** and **7d** for now. | ||
|
||
The monitor can be accessed either by the **public URL** or/and by embedding the | ||
monitor within a **status page**. | ||
|
||
- Public URL: | ||
[openstatus.dev/public/monitors/1](https://openstatus.dev/public/monitors/1) | ||
- Status Page URL: | ||
[status.openstatus.dev/monitors/1](https://status.openstatus.dev/monitors/1) | ||
|
||
You can enable public mode from the monitor _Danger_ section setting. |
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,22 @@ | ||
--- | ||
title: "Launch of RapidLaunch 2" | ||
slug: "launch-of-rapidlaunch-2" | ||
description: "RapidLaunch is a platform to create and launch SaaS products quickly." | ||
version: "0.1.0" | ||
publishedAt: 2024-08-01 | ||
thumbnail: "https://fakeimg.pl/896x400/d1d1d1/6b6b6b" | ||
--- | ||
|
||
You can now change the monitors visibility to public. This will allow you to | ||
share the monitor's metrics _(the overview page)_ with your users. The period is | ||
restricted to **1d** and **7d** for now. | ||
|
||
The monitor can be accessed either by the **public URL** or/and by embedding the | ||
monitor within a **status page**. | ||
|
||
- Public URL: | ||
[openstatus.dev/public/monitors/1](https://openstatus.dev/public/monitors/1) | ||
- Status Page URL: | ||
[status.openstatus.dev/monitors/1](https://status.openstatus.dev/monitors/1) | ||
|
||
You can enable public mode from the monitor _Danger_ section setting. |
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,22 @@ | ||
--- | ||
title: "Launch of RapidLaunch 2" | ||
slug: "launch-of-rapidlaunch-2" | ||
description: "RapidLaunch is a platform to create and launch SaaS products quickly." | ||
version: "0.4.0" | ||
publishedAt: 2024-10-06 | ||
thumbnail: "https://fakeimg.pl/896x400/d1d1d1/6b6b6b" | ||
--- | ||
|
||
You can now change the monitors visibility to public. This will allow you to | ||
share the monitor's metrics _(the overview page)_ with your users. The period is | ||
restricted to **1d** and **7d** for now. | ||
|
||
The monitor can be accessed either by the **public URL** or/and by embedding the | ||
monitor within a **status page**. | ||
|
||
- Public URL: | ||
[openstatus.dev/public/monitors/1](https://openstatus.dev/public/monitors/1) | ||
- Status Page URL: | ||
[status.openstatus.dev/monitors/1](https://status.openstatus.dev/monitors/1) | ||
|
||
You can enable public mode from the monitor _Danger_ section setting. |
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 |
---|---|---|
@@ -1,9 +1,11 @@ | ||
import "server-only"; | ||
|
||
import { getMDXData } from "@/lib/mdx"; | ||
import type { BlogMetaData } from "@/validations/mdx"; | ||
import { type BlogMetaData, blogMetaSchema } from "@/validations/mdx-content"; | ||
|
||
export async function getBlogs() { | ||
const dir = "src/content/blog"; | ||
return await getMDXData<BlogMetaData>(dir); | ||
return (await getMDXData<BlogMetaData>(dir, blogMetaSchema)).filter( | ||
(blog) => !blog.metaData.isDraft, | ||
); | ||
} |
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,14 @@ | ||
import "server-only"; | ||
|
||
import { getMDXData } from "@/lib/mdx"; | ||
import { | ||
type ChangelogMetaData, | ||
changelogMetaSchema, | ||
} from "@/validations/mdx-content"; | ||
|
||
export async function getChangelogs() { | ||
const dir = "src/content/changelogs"; | ||
return ( | ||
await getMDXData<ChangelogMetaData>(dir, changelogMetaSchema) | ||
).filter((changelog) => !changelog.metaData.isDraft); | ||
} |
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,9 +1,11 @@ | ||
import "server-only"; | ||
|
||
import { getMDXData } from "@/lib/mdx"; | ||
import type { DocsMetaData } from "@/validations/mdx"; | ||
import { type DocsMetaData, docsMetaSchema } from "@/validations/mdx-content"; | ||
|
||
export async function getDocs() { | ||
const dir = "src/content/docs"; | ||
return await getMDXData<DocsMetaData>(dir); | ||
return (await getMDXData<DocsMetaData>(dir, docsMetaSchema)).filter( | ||
(doc) => !doc.metaData.isDraft, | ||
); | ||
} |
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