add repo readmes

This commit is contained in:
Night Kaly 2024-03-14 00:45:09 +00:00
parent 4747419c1a
commit 2ff2b9c2af
No known key found for this signature in database
GPG key ID: 8E829D3381CFEBBE
10 changed files with 63 additions and 0 deletions

5
content/repo/auth.md Normal file
View file

@ -0,0 +1,5 @@
---
title: "auth"
description: "Documentation of auth"
---
{{<getreadme repo="auth">}}

5
content/repo/based.md Normal file
View file

@ -0,0 +1,5 @@
---
title: "based"
description: "Documentation of based"
---
{{<getreadme repo="based">}}

5
content/repo/cath.md Normal file
View file

@ -0,0 +1,5 @@
---
title: "cath"
description: "Documentation of cath"
---
{{<getreadme repo="cath">}}

5
content/repo/ccc.md Normal file
View file

@ -0,0 +1,5 @@
---
title: "ccc"
description: "Documentation of ccc"
---
{{<getreadme repo="ccc">}}

5
content/repo/lilase.md Normal file
View file

@ -0,0 +1,5 @@
---
title: "Lilase"
description: "Documentation of Lilase"
---
{{<getreadme repo="lilase">}}

5
content/repo/noted.md Normal file
View file

@ -0,0 +1,5 @@
---
title: "noted"
description: "Documentation of noted"
---
{{<getreadme repo="noted">}}

5
content/repo/nxc-host.md Normal file
View file

@ -0,0 +1,5 @@
---
title: "nxc-host"
description: "Documentation of nxc-host"
---
{{<getreadme repo="nxc-host">}}

5
content/repo/nyx.md Normal file
View file

@ -0,0 +1,5 @@
---
title: "NYX"
description: "Documentation of NYX"
---
{{<getreadme repo="cath.exe">}}

5
content/repo/rush.md Normal file
View file

@ -0,0 +1,5 @@
---
title: "rush"
description: "Documentation of rush"
---
{{<getreadme repo="rush">}}

View file

@ -0,0 +1,18 @@
{{ $repo := .Get "repo" }}
{{ $url := printf "https://api.github.com/repos/night0721/%s/contents/README.md" $repo }}
{{ $response := getJSON $url }}
{{ with $response }}
{{ if isset . "content" }}
{{ $content := .content | base64Decode }}
{{ $markdown := $content | markdownify }}
<div class="readme-content">
{{ $markdown | safeHTML }}
</div>
{{ else }}
<p>Error fetching README from GitHub.</p>
{{ end }}
{{ else }}
<p>Error fetching data from GitHub API.</p>
{{ end }}