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

Fixes Feed Not Displaying Author Name #329

Merged
merged 3 commits into from Sep 13, 2017

Conversation

Projects
None yet
2 participants
@davidsivocha
Contributor

davidsivocha commented Sep 13, 2017

By Default, the feed doesn't actually show the author name as it's not loaded

By creating a variable that correctly reads from the article metadata to pull in the JSON of the Author we can present the article author name in the feed.

Fixes Feed Not Displaying Author Name
By Default, the feed doesn't actually show the author name as it's not loaded

By creating a variable that correctly reads from the article metadata to pull in the JSON of the Author we can present the article author name in the feed.
@jnordberg

This comment has been minimized.

Show comment
Hide comment
@jnordberg

jnordberg Sep 13, 2017

Owner

Thanks! Can you add a fallback if the author.json is not found?

Owner

jnordberg commented Sep 13, 2017

Thanks! Can you add a fallback if the author.json is not found?

Add check to ensure author file exists
Checks if Author is defined. If not, falls back to an almost null object
@davidsivocha

This comment has been minimized.

Show comment
Hide comment
@davidsivocha

davidsivocha Sep 13, 2017

Contributor

Added a one liner, that creates a basic empty object tree so that it doesn't throw an error

Contributor

davidsivocha commented Sep 13, 2017

Added a one liner, that creates a basic empty object tree so that it doesn't throw an error

Refactor
Now only uses author.json if present otherwise continues with existing behaviour
@davidsivocha

This comment has been minimized.

Show comment
Hide comment
@davidsivocha

davidsivocha Sep 13, 2017

Contributor

I've refactored now. It will look for an author.json

If one is found it will use that, otherwise it will use the default original behaviou

Contributor

davidsivocha commented Sep 13, 2017

I've refactored now. It will look for an author.json

If one is found it will use that, otherwise it will use the default original behaviou

@jnordberg

This comment has been minimized.

Show comment
Hide comment
@jnordberg

jnordberg Sep 13, 2017

Owner

Looks good, tested?

Owner

jnordberg commented Sep 13, 2017

Looks good, tested?

@davidsivocha

This comment has been minimized.

Show comment
Hide comment
@davidsivocha

davidsivocha Sep 13, 2017

Contributor

Tested under the following circumstances.

  1. author.json not present - Uses default behaviour
  2. author.json present with no name field - will display no author data. No errors. behaviour intended
  3. author.json present with name field - displays name from author json. Behaviour intended
Contributor

davidsivocha commented Sep 13, 2017

Tested under the following circumstances.

  1. author.json not present - Uses default behaviour
  2. author.json present with no name field - will display no author data. No errors. behaviour intended
  3. author.json present with name field - displays name from author json. Behaviour intended
@davidsivocha

This comment has been minimized.

Show comment
Hide comment
@davidsivocha

davidsivocha Sep 13, 2017

Contributor

All test cases compile successfully with wintersmith build flagging no errors

Contributor

davidsivocha commented Sep 13, 2017

All test cases compile successfully with wintersmith build flagging no errors

@jnordberg jnordberg merged commit 9ace781 into jnordberg:master Sep 13, 2017

@jnordberg

This comment has been minimized.

Show comment
Hide comment
@jnordberg

jnordberg Sep 13, 2017

Owner

Thanks!

A+++ would merge again

Owner

jnordberg commented Sep 13, 2017

Thanks!

A+++ would merge again

@davidsivocha

This comment has been minimized.

Show comment
Hide comment
@davidsivocha

davidsivocha Sep 13, 2017

Contributor

Haha thanks. I'll have to see what else I can contribute to this!

Contributor

davidsivocha commented Sep 13, 2017

Haha thanks. I'll have to see what else I can contribute to this!

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