route to stagit instead of dynamic readme
This commit is contained in:
parent
f4497698bf
commit
bd8d077e99
13 changed files with 2 additions and 88 deletions
|
@ -18,8 +18,8 @@ ignoreErrors = ["error-remote-getjson"]
|
|||
weight = 20
|
||||
|
||||
[[menu.main]]
|
||||
name = "Repos"
|
||||
url = "/repos"
|
||||
name = "Git"
|
||||
url = "https://git.night0721.xyz"
|
||||
weight = 30
|
||||
|
||||
[[menu.main]]
|
||||
|
|
|
@ -1,6 +0,0 @@
|
|||
---
|
||||
title: "Repositories"
|
||||
description: "Documentation for my projects"
|
||||
---
|
||||
|
||||
{{< repolist >}}
|
|
@ -1,5 +0,0 @@
|
|||
---
|
||||
title: "auth"
|
||||
description: "Documentation of auth"
|
||||
---
|
||||
{{<getreadme repo="auth">}}
|
|
@ -1,5 +0,0 @@
|
|||
---
|
||||
title: "based"
|
||||
description: "Documentation of based"
|
||||
---
|
||||
{{<getreadme repo="based">}}
|
|
@ -1,5 +0,0 @@
|
|||
---
|
||||
title: "cath"
|
||||
description: "Documentation of cath"
|
||||
---
|
||||
{{<getreadme repo="cath">}}
|
|
@ -1,5 +0,0 @@
|
|||
---
|
||||
title: "ccc"
|
||||
description: "Documentation of ccc"
|
||||
---
|
||||
{{<getreadme repo="ccc">}}
|
|
@ -1,5 +0,0 @@
|
|||
---
|
||||
title: "Lilase"
|
||||
description: "Documentation of Lilase"
|
||||
---
|
||||
{{<getreadme repo="lilase">}}
|
|
@ -1,5 +0,0 @@
|
|||
---
|
||||
title: "noted"
|
||||
description: "Documentation of noted"
|
||||
---
|
||||
{{<getreadme repo="noted">}}
|
|
@ -1,5 +0,0 @@
|
|||
---
|
||||
title: "nxc-host"
|
||||
description: "Documentation of nxc-host"
|
||||
---
|
||||
{{<getreadme repo="nxc-host">}}
|
|
@ -1,5 +0,0 @@
|
|||
---
|
||||
title: "NYX"
|
||||
description: "Documentation of NYX"
|
||||
---
|
||||
{{<getreadme repo="cath.exe">}}
|
|
@ -1,5 +0,0 @@
|
|||
---
|
||||
title: "rush"
|
||||
description: "Documentation of rush"
|
||||
---
|
||||
{{<getreadme repo="rush">}}
|
|
@ -1,23 +0,0 @@
|
|||
{{ $repo := .Get "repo" }}
|
||||
{{ $rootReadmeURL := printf "https://api.github.com/repos/night0721/%s/contents/README.md" $repo }}
|
||||
|
||||
{{ $response := getJSON $rootReadmeURL }}
|
||||
{{ $githubDirReadmeURL := printf "https://api.github.com/repos/night0721/%s/contents/.github/README.md" $repo }}
|
||||
|
||||
{{ if and (not $response) (not (isset $response "content")) }}
|
||||
{{ $response = getJSON $githubDirReadmeURL }}
|
||||
{{ end }}
|
||||
|
||||
{{ with $response }}
|
||||
{{ if isset . "content" }}
|
||||
{{ $content := .content | base64Decode }}
|
||||
{{ $markdown := $content | markdownify }}
|
||||
<div class="readme-content">
|
||||
{{ $markdown | safeHTML }}
|
||||
</div>
|
||||
{{ else }}
|
||||
<p>No README found for the repository.</p>
|
||||
{{ end }}
|
||||
{{ else }}
|
||||
<p>Error fetching README from GitHub.</p>
|
||||
{{ end }}
|
|
@ -1,12 +0,0 @@
|
|||
<ul>
|
||||
{{ $files := readDir "content/repos" }}
|
||||
{{ range $files }}
|
||||
{{ $fileNameParts := split .Name "." }}
|
||||
{{ $fileName := index $fileNameParts 0 }}
|
||||
{{ if ne $fileName "_index" }}
|
||||
<li>
|
||||
<a href="/repos/{{ $fileName }}">{{ $fileName }}</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</ul>
|
Loading…
Reference in a new issue