Skip to content

Author field returned in raw object #299

Open
@pingu8007

Description

@pingu8007

Since Atom feed is extended from XML, an author field should be something human readable. This plugin, however, return an object-like string in this field.
I can't find an example with twitter handle, just a feeling.

I have following plugin enabled:

  • jekyll-sitemap (1.2.0)
  • jekyll-feed (0.13.0)
  • jekyll-seo-tag (2.5.0)

Input

# _data/authors.yml
PinGu:
  twitter: pinguotaku
  picture: /images/avatar.png
  url: http://example.org/
# _config.yml
author: PinGu

Expected output

I don't know which is correct but it should be a text at least.

<feed>
  <author>
    <name>PinGu</name>
    <url>http://example.org/</url>
  </author>
  <entry>
    <author>
      <name>PinGu</name>
      <url>http://example.org/</url>
    </author>
  </entry>
</feed>

or

<feed>
  <author>
    <name>@pinguotaku</name>
    <url>http://example.org/</url>
  </author>
  <entry>
    <author>
      <name>@pinguotaku</name>
      <url>http://example.org/</url>
    </author>
  </entry>
</feed>

Actual output

<feed>
  <author>
    <name>PinGu</name> # Not following _data/authors.yml
  </author>
  <entry>
    <author>
      <name>{"twitter"=>"pinguotaku", "picture"=>"/images/avatar.png", "url"=>"http://example.org/"}</name> # object-like string with all value
    </author>
  </entry>
</feed>

Workaround

Add key name to author

# _data/authors.yml
PinGu:
  name: Pin
  twitter: pinguotaku
  picture: /images/avatar.png
  url: http://example.org/

and the result will be

<feed>
  <author>
    <name>PinGu</name> # Still not following _data/authors.yml
  </author>
  <entry>
    <author>
      <name>Pin</name> # Only name field, others are missing
    </author>
  </entry>
</feed>

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions