Skip to content

Commit

Permalink
chore: create page to auto-fetch and list GitHub releases with notes
Browse files Browse the repository at this point in the history
  • Loading branch information
divya-binil committed Oct 28, 2024
1 parent 09511cc commit 51b8142
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 0 deletions.
13 changes: 13 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
"gsap": "^3.12.5",
"html-minifier-terser": "^7.2.0",
"lenis": "^1.1.14",
"marked": "^14.1.3",
"preline": "^2.5.1",
"rimraf": "^6.0.1",
"sharp": "^0.33.5",
Expand Down
16 changes: 16 additions & 0 deletions src/components/ui/releases/ReleaseList.astro
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
import { marked } from 'marked';
const response = await fetch('https://api.github.com/repos/opsfolio/releases.opsfolio.com/releases');
const releases = await response.json();
---

<ul>
{releases.map((release: { name: unknown; body: string; html_url: string | URL | null | undefined; }) => (
<li>
<h2>{release.name}</h2>
<div set:html={marked(release.body)}></div>
<a href={release.html_url} target="_blank">View Release</a>
</li>
))}
</ul>
9 changes: 9 additions & 0 deletions src/content/docs/docs/releases-next/index.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
title: Releases
description: Release notes for Resource Surveillance

---

import ReleasesList from '@/components/ui/releases/ReleaseList.astro';

<ReleasesList />

0 comments on commit 51b8142

Please sign in to comment.