Skip to content

Commit 6cd0a5a

Browse files
authored
fix: recognize page author by id not just github (#335)
Signed-off-by: Jaime Silvela <[email protected]>
1 parent 3e54a97 commit 6cd0a5a

File tree

4 files changed

+6
-2
lines changed

4 files changed

+6
-2
lines changed

archetypes/authors/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@
22
name: {{ .Name | title}}
33
avatar: temp-avatar.png
44
github: {{ .Name }}
5+
id: {{ .Name }}
56
---

content/authors/fdrees/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
name: Floor Drees
33
avatar: floor.jpg
44
github: floord
5+
id: fdrees
56
---
67

78
Open Source community advocate and Principal Program Manager at EDB. PostgreSQL Code of Conduct Committee member, PG EU Diversity Committee member, PGDay Lowlands organizer.

content/authors/jgonzalez/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
name: Jonathan Gonzalez V.
33
avatar: jgonzalez-gh.jpeg
44
github: sxd
5+
id: jgonzalez
56
---
67

78
A free software lover, passionate about OpenSource and all the tools that

layouts/authors/single.html

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,10 @@ <h3><a href="https://github.com/{{ .Params.github }}">{{ .Params.name }}</a></h3
1414
</div>
1515

1616
<h3 class="text-xl font-bold mb-6">Posts by {{ .Params.name }}</h3>
17-
{{ $this_author := .Params.github }}
17+
{{ $author_git := .Params.github }}
18+
{{ $author_id := .Params.id }}
1819
{{ range (.Site.GetPage "/blog").Pages}}
19-
{{ if eq .Params.author $this_author }}
20+
{{ if or (eq .Params.author $author_git) (eq .Params.author $author_id) }}
2021
<div class="column is-half">
2122
<a href="{{ .RelPermalink }}">{{ .Params.title}}</a>
2223
{{ partial "blog_datetime.html" . }}

0 commit comments

Comments
 (0)