Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

start adding editors to JSON #863

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion content/author/ronald-visser/_index.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
name: Ronald M. Visser
mastodon: https://akademienl.social/@RonaldVisser
bio: Interdisicplinary scientist combining archaeology, dendrochronology and data science
bio: Interdisciplinary scientist combining archaeology, dendrochronology and data science
github: RonaldVisser
gitlab: RonaldVisser
orcid: 0000-0001-6966-1729
Expand Down
3 changes: 1 addition & 2 deletions content/blog/2024-06-06-from-scripts-to-package/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
slug: "from-scripts-to-package"
title: From scripts to package. Developing dendroNetwork and learning with rOpenSci
package_version: 0.5.4
author:
- Ronald Visser
author: Ronald M. Visser
editor:
- Steffi LaZerte
date: 2024-06-06
Expand Down
16 changes: 14 additions & 2 deletions themes/ropensci/layouts/blog/list.json.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,28 @@
{{ $data.Set "authors" .Params.author }}
{{ else }}
{{ $data.Set "authors" (slice .Params.author) }}
{{ end }}
{{ if eq (substr (jsonify .Params.editor) 0 1) "[" }}
{{ $data.Set "editors" .Params.editor }}
{{ else }}
{{ $data.Set "editors" (slice .Params.editor) }}
{{ end }}
{
"id": "{{ .Permalink }}",
"title": "{{ .Title }}",
"language" : "{{ .Lang }}",
"authors": [{{ range $i, $e := ($data.Get "authors") }}{{ range first 1 (where ($data.Get "pages") ".Params.name" $e) }}{{ $params := .Params }}{{ $name := $params.name }}{{ if $i }}, {{ end }}{{ range first 1 (where ($data.Get "pages") ".Params.name" $e) }}
"authors": [{{ $editors := ($data.Get "editors") }}{{ if gt (len $editors) 0 }}{{ range $i, $e := ($data.Get "editors") }}{{ range first 1 (where ($data.Get "pages") ".Params.name" $e) }}{{ $params := .Params }}{{ $name := $params.name }}{{ range first 1 (where ($data.Get "pages") ".Params.name" $e) }}
{
"name": "{{ $name }}",
"url": "{{ if isset .Params "orcid" }}https://orcid.org/{{ .Params.orcid }}{{ else }}{{ .Permalink }}{{ end }}",
"avatar": "{{ ( partial "blogs/author-img" . ) }}"
"avatar": "{{ ( partial "blogs/author-img" . ) }}",
"_role": "editor"
},{{ end }}{{ end }}{{ end }}{{ end }}{{ range $i, $e := ($data.Get "authors") }}{{ range first 1 (where ($data.Get "pages") ".Params.name" $e) }}{{ $params := .Params }}{{ $name := $params.name }}{{ if $i }}, {{ end }}{{ range first 1 (where ($data.Get "pages") ".Params.name" $e) }}
{
"name": "{{ $name }}",
"url": "{{ if isset .Params "orcid" }}https://orcid.org/{{ .Params.orcid }}{{ else }}{{ .Permalink }}{{ end }}",
"avatar": "{{ ( partial "blogs/author-img" . ) }}",
"_role": "author"
}{{ end }}{{ end }}{{ end }}],
{{ with .Params.tags }} "tags": {{ . | uniq | jsonify}},{{ end }}
"content_html": {{ .Content | replaceRE "\n" "" | jsonify }},
Expand Down