add repos main page and to menu
This commit is contained in:
parent
5772007454
commit
81d846f0d2
13 changed files with 28 additions and 4 deletions
11
config.toml
11
config.toml
|
@ -16,21 +16,26 @@ ignoreErrors = ["error-remote-getjson"]
|
||||||
name = "Posts"
|
name = "Posts"
|
||||||
url = "/posts"
|
url = "/posts"
|
||||||
weight = 20
|
weight = 20
|
||||||
|
|
||||||
|
[[menu.main]]
|
||||||
|
name = "Repos"
|
||||||
|
url = "/repos"
|
||||||
|
weight = 30
|
||||||
|
|
||||||
[[menu.main]]
|
[[menu.main]]
|
||||||
name = "Contact"
|
name = "Contact"
|
||||||
url = "/contact"
|
url = "/contact"
|
||||||
weight = 30
|
weight = 40
|
||||||
|
|
||||||
[[menu.main]]
|
[[menu.main]]
|
||||||
name = "Links"
|
name = "Links"
|
||||||
url = "/links"
|
url = "/links"
|
||||||
weight = 40
|
weight = 50
|
||||||
|
|
||||||
[[menu.main]]
|
[[menu.main]]
|
||||||
name = "Bookmarks"
|
name = "Bookmarks"
|
||||||
url = "/bookmarks"
|
url = "/bookmarks"
|
||||||
weight = 50
|
weight = 60
|
||||||
|
|
||||||
[[menu.social]]
|
[[menu.social]]
|
||||||
name = "Codeberg"
|
name = "Codeberg"
|
||||||
|
|
5
content/repos/_index.md
Normal file
5
content/repos/_index.md
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
---
|
||||||
|
title: "Repositories"
|
||||||
|
---
|
||||||
|
|
||||||
|
{{< repolist >}}
|
|
@ -4,6 +4,8 @@
|
||||||
|
|
||||||
{{ .Content }}
|
{{ .Content }}
|
||||||
|
|
||||||
{{ partial "posts.html" . }}
|
{{ if eq .Section "posts" }}
|
||||||
|
{{ partial "posts.html" . }}
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
{{ partial "footer.html" . }}
|
{{ partial "footer.html" . }}
|
||||||
|
|
12
layouts/shortcodes/repolist.html
Normal file
12
layouts/shortcodes/repolist.html
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
<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