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

Multiple authors for single article #956

Closed
peterdesmet opened this issue Jul 4, 2013 · 13 comments
Closed

Multiple authors for single article #956

peterdesmet opened this issue Jul 4, 2013 · 13 comments

Comments

@peterdesmet
Copy link
Contributor

I would like to add multiple authors to a single article. Using Markdown, I tried comma-separate authors in my article metadata (like you can do with tags):

Tags: tag1, tag2
Authors: author1, author2

But this generated a link to author1-author2, instead of 2 links to the 2 author pages. Is there another way to do this and if no, are there any plans to support this feature?

@justinmayer
Copy link
Member

Hi Peter. I don't believe the behavior you describe is currently supported, and I'm not aware of any plans to implement it. That said, if you (or someone else in the community) can devise an elegant way to support such a feature, we would of course be open to pull requests.

@almet
Copy link
Member

almet commented Jul 4, 2013

Implementing multiple authors is something that would be indeed
interesting. Some random thoughts:

  • You would want to keep to compatibility with themes, so I suppose we
    would attach a new metadata to the content object (article, page),
    probably named "authors".
  • content.author would fallback to either a list of authors or the
    first one defined.
  • the new defined authors should be a list containing only one author
    if only one is provided.
  • the new themes should be looking for .authors on the articles /
    pages rather than .author.

That's all I have in mind, hope that helps.

@almet
Copy link
Member

almet commented Jul 4, 2013

A little first try, but it doesn't seem to be working as I want it to,
https://github.com/getpelican/pelican/compare/multiple-authors

Don't hesitate to continue working on this.

@peterdesmet
Copy link
Contributor Author

Thanks for the response. Python is still very new to me though, so I don't have the skills to work on this (yet). 😐

@justinmayer
Copy link
Member

Hi Peter. Any chance this is something you'd care to work on?

@peterdesmet
Copy link
Contributor Author

Hi Justin, as mentioned before, my Python skills are minimal. But it might be something @bartaelterman (much better at Python than me) and I could have a look at. Can't promise much though.

@justinmayer
Copy link
Member

Would be great to have your participation. As noted above, Alexis has provided a head start. Please keep us posted!

justinmayer added a commit that referenced this issue Feb 14, 2014
Multiple authors implementation for #956
@justinmayer
Copy link
Member

As noted above, this feature was implemented by @bubenkoff. Bravo!

@peterdesmet
Copy link
Contributor Author

That's awesome! @bubenkoff you rock! 👍

@seawolff
Copy link

Currently getting this:

http://cl.ly/image/0H2b0o2e2I0q

@MartinThoma
Copy link

How should mutiple authors be written in the header? I am currently writing

Title: Paper Discussion Group
Category: Projekte
Date: 2015-12-02 17:30
Tags: Paper, Deep Learning, Autonomes Fahren
Authors: Marvin Teichmann, Martin Thoma

The article blablalbal adfasdf adsfasdf asd

However, when I look at the generated code, I see:

[...]
 <meta name="author" content="Marvin Teichmann" />
[...]

So only the first person appears there. I've expected:

[...]
 <meta name="author" content="Marvin Teichmann, Martin Thoma" />
[...]

Is this a bug? (I have Pelican 3.6.3).

@ingwinlu
Copy link
Contributor

ingwinlu commented Dec 4, 2015

In the theme you used, yes

On 4 December 2015 at 11:01, Martin Thoma notifications@github.com wrote:

How should mutiple authors be written in the header? I am currently writing

Title: Paper Discussion Group
Category: Projekte
Date: 2015-12-02 17:30
Tags: Paper, Deep Learning, Autonomes Fahren
Authors: Marvin Teichmann, Martin Thoma

The article blablalbal adfasdf adsfasdf asd

However, when I look at the generated code, I see:

[...]

[...]

So only the first person appears there. I've expected:

[...]

[...]

Is this a bug?


Reply to this email directly or view it on GitHub
#956 (comment).

@MartinThoma
Copy link

I guess the relevant part is

{% if page.author %}
    <meta name="author" content="{{ page.author }}" />
{% else %}
    <meta name="author" content="{{ AUTHOR }}" />
{% endif %}

I've also found the themes docs docs and I guess it should be

{% if page.authors %}
    <meta name="author" content="{{ page.authors | join(',') }}" />
{% elif page.author %}
    <meta name="author" content="{{ page.author }}" />
{% else %}
    <meta name="author" content="{{ AUTHOR }}" />
{% endif %}

At least on a first glance, it seems to work.

What is the reason to use author and authors at the same time? Wouldn't it be better to have only authors so that people who write templates will see their mistake?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants