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

Author field returned in raw object #299

Open
pingu8007 opened this issue Feb 15, 2020 · 2 comments · May be fixed by #300
Open

Author field returned in raw object #299

pingu8007 opened this issue Feb 15, 2020 · 2 comments · May be fixed by #300
Labels

Comments

@pingu8007
Copy link

pingu8007 commented Feb 15, 2020

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>
pingu8007 added a commit to pingu8007/jekyll-feed that referenced this issue Feb 17, 2020
@mattr- mattr- added pinned and removed stale labels Apr 15, 2020
@jekyll jekyll deleted a comment from jekyllbot Apr 15, 2020
@pingu8007
Copy link
Author

Issue still exist in version 0.14.0

@qdread
Copy link

qdread commented Dec 2, 2020

Confirming that this issue still exists, though I was able to use @pingu8007 's workaround successfully.

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

Successfully merging a pull request may close this issue.

4 participants