Skip to content
This repository has been archived by the owner on Mar 9, 2022. It is now read-only.

[FEATURE] Could NOT support multi author for one post #293

Open
yanboyang713 opened this issue Oct 4, 2021 · 2 comments
Open

[FEATURE] Could NOT support multi author for one post #293

yanboyang713 opened this issue Oct 4, 2021 · 2 comments
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@yanboyang713
Copy link

yanboyang713 commented Oct 4, 2021

Currently, I found each post only supports one author's name. This is works.
For example:

---
title: "New post"
author: "Boyang Yan"
date: 2021-10-05T03:44:00+11:00
categories: ["Programming"]
draft: false
---

However, If one post has multi-author, it does NOT work.
For example:

---
title: "New post"
author: ["Boyang Yan", "test"]
date: 2021-10-05T03:44:00+11:00
categories: ["Programming"]
draft: false
---

Error msg:

Error: Error building site: failed to render pages: render of "page" failed: execute of template failed: template: posts/single.html:16:12: executing "posts/single.html" at <partial "head/seo.html" .>: error calling partial: "/home/runner/work/yanboyang713.github.io/yanboyang713.github.io/themes/CodeIT/layouts/partials/head/seo.html:147:31": execute of template failed: template: partials/head/seo.html:147:31: executing "partials/head/seo.html" at <safeHTML>: error calling safeHTML: unable to cast []string{"Boyang Yan", "test"} of type []string to string
@yanboyang713 yanboyang713 added the enhancement New feature or request label Oct 4, 2021
@victor-pogor
Copy link
Member

victor-pogor commented Nov 1, 2021

Hello @yanboyang713.

Yes, I will add multi-author support. But there is another property (authorLink) to improve.

I thought to create something like this in FrontMatter:

[[authors]]
authorName = "Author1"
authorLink = "https://www.google.com"

[[authors]]
authorName = "Author2"
authorLink = "https://www.google.com"

But I don't think it's a good idea. I'm not familiar with the Org format, but I think it does not support complex object types.

I think we need to add something like this:

author: ["Author1", "Author2"]
authorLink: ["https://www.google.com", "https://www.google.com"]

Also, backward compatibility will need to maintain in order to support the single author.

Reference issues/PRs: #255, #153.

@victor-pogor victor-pogor self-assigned this Nov 1, 2021
@victor-pogor victor-pogor added this to the v0.3.0 milestone Nov 1, 2021
@yanboyang713
Copy link
Author

Hello @victor-pogor

Good day to you and thanks for your reply.

ok, I will have a look authorLink, first time know this.

Have a nice day,

Boyang

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants