add repo readmes
This commit is contained in:
parent
4747419c1a
commit
2ff2b9c2af
10 changed files with 63 additions and 0 deletions
5
content/repo/auth.md
Normal file
5
content/repo/auth.md
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
---
|
||||||
|
title: "auth"
|
||||||
|
description: "Documentation of auth"
|
||||||
|
---
|
||||||
|
{{<getreadme repo="auth">}}
|
5
content/repo/based.md
Normal file
5
content/repo/based.md
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
---
|
||||||
|
title: "based"
|
||||||
|
description: "Documentation of based"
|
||||||
|
---
|
||||||
|
{{<getreadme repo="based">}}
|
5
content/repo/cath.md
Normal file
5
content/repo/cath.md
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
---
|
||||||
|
title: "cath"
|
||||||
|
description: "Documentation of cath"
|
||||||
|
---
|
||||||
|
{{<getreadme repo="cath">}}
|
5
content/repo/ccc.md
Normal file
5
content/repo/ccc.md
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
---
|
||||||
|
title: "ccc"
|
||||||
|
description: "Documentation of ccc"
|
||||||
|
---
|
||||||
|
{{<getreadme repo="ccc">}}
|
5
content/repo/lilase.md
Normal file
5
content/repo/lilase.md
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
---
|
||||||
|
title: "Lilase"
|
||||||
|
description: "Documentation of Lilase"
|
||||||
|
---
|
||||||
|
{{<getreadme repo="lilase">}}
|
5
content/repo/noted.md
Normal file
5
content/repo/noted.md
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
---
|
||||||
|
title: "noted"
|
||||||
|
description: "Documentation of noted"
|
||||||
|
---
|
||||||
|
{{<getreadme repo="noted">}}
|
5
content/repo/nxc-host.md
Normal file
5
content/repo/nxc-host.md
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
---
|
||||||
|
title: "nxc-host"
|
||||||
|
description: "Documentation of nxc-host"
|
||||||
|
---
|
||||||
|
{{<getreadme repo="nxc-host">}}
|
5
content/repo/nyx.md
Normal file
5
content/repo/nyx.md
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
---
|
||||||
|
title: "NYX"
|
||||||
|
description: "Documentation of NYX"
|
||||||
|
---
|
||||||
|
{{<getreadme repo="cath.exe">}}
|
5
content/repo/rush.md
Normal file
5
content/repo/rush.md
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
---
|
||||||
|
title: "rush"
|
||||||
|
description: "Documentation of rush"
|
||||||
|
---
|
||||||
|
{{<getreadme repo="rush">}}
|
18
layouts/shortcodes/getreadme.html
Normal file
18
layouts/shortcodes/getreadme.html
Normal 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 }}
|
Loading…
Reference in a new issue