-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: create page to auto-fetch and list GitHub releases with notes
- Loading branch information
1 parent
09511cc
commit 51b8142
Showing
4 changed files
with
39 additions
and
0 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,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> |
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,9 @@ | ||
--- | ||
title: Releases | ||
description: Release notes for Resource Surveillance | ||
|
||
--- | ||
|
||
import ReleasesList from '@/components/ui/releases/ReleaseList.astro'; | ||
|
||
<ReleasesList /> |