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

Add image enclosure with post.image metadata #68

Merged
merged 3 commits into from
Jan 1, 2019
Merged

Add image enclosure with post.image metadata #68

merged 3 commits into from
Jan 1, 2019

Conversation

thom4parisot
Copy link
Member

@thom4parisot thom4parisot commented Nov 26, 2018

When a post has an image front matter, it gets displayed as:

  • <enclosure type=image url="http://bloguri/{{ post.image }}" /> for RSS2 output
  • <content type=image src="http://bloguri/{{ post.image }}" /> for Atom output

@coveralls
Copy link

Coverage Status

Coverage remained the same at 100.0% when pulling 949f621 on oncletom:patch-1 into 775c6aa on hexojs:master.

@coveralls
Copy link

coveralls commented Nov 26, 2018

Coverage Status

Coverage remained the same at 100.0% when pulling 0cf6d37 on oncletom:patch-1 into 775c6aa on hexojs:master.

@yoshinorin yoshinorin requested a review from a team November 29, 2018 09:35
Copy link
Member

@yoshinorin yoshinorin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code is LGTM.

But, it seems post.image is not a default value of post.
How do you think about use of not default value ?

@hexojs/core
And I want to other maintainer's opnion.

@thom4parisot
Copy link
Member Author

@yoshinorin it's not a default value indeed.

I have built this assumption because the built-in open_graph() helper uses it. If the people who read the doc would use another official plugin, I'd assume I would use the same front matter name to display the same information.

jekyll-seo-tag — it's not related to hexo but it makes the content more portable.

On the other hand, I can see there is a photos field in the Post model, but I have not yet seen a documentation about it either.

What do you think? I can create a PR in hexo to make the image field explicit, and possibly use as a call for clarification about the photos field as well.

@yoshinorin
Copy link
Member

@oncletom

because the built-in open_graph() helper uses it.

Oh, I didn't notice it. I think it's enough reason for merge this PR.

@thom4parisot
Copy link
Member Author

Excellent. Let me know if you think of something else before merging this PR.

@yoshinorin
Copy link
Member

@oncletom
I will going to test this PR on my local machine. Would you please wait a little ? Thanks.

@thom4parisot
Copy link
Member Author

No problem :)

It's running on this website of mine for example (source, feed).

@yoshinorin yoshinorin merged commit fec1dac into hexojs:master Jan 1, 2019
@yoshinorin
Copy link
Member

Thanks. Done !

@thom4parisot
Copy link
Member Author

Thank you 🙂

@thom4parisot
Copy link
Member Author

Do you think you (or someone else) could tag a new (minor) release and publish it on npm?

@yoshinorin
Copy link
Member

yoshinorin commented Jan 23, 2019

No. I think it's better. But, I have no permission of publish to npm.
@NoahDragon & @JLHwung How do you think ?

@thom4parisot
Copy link
Member Author

thom4parisot commented Jan 23, 2019

A good thing would be to deploy automatically on npm on a new Git tag.
TravisCI got you covered: https://docs.travis-ci.com/user/deployment/npm/

I can create a PR with what's needed if that's something you would lean towards. Although the CI would still have to be configured by someone with a valid npm access token.

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

Successfully merging this pull request may close these issues.

None yet

3 participants