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

Conversation

@oncletom
Copy link
Contributor

oncletom 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

This comment has been minimized.

Copy link

coveralls commented Nov 26, 2018

Coverage Status

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

@coveralls

This comment has been minimized.

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.

oncletom added 2 commits Nov 26, 2018
@YoshinoriN YoshinoriN requested a review from hexojs/core Nov 29, 2018
Copy link
Member

YoshinoriN left a comment

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.

@oncletom

This comment has been minimized.

Copy link
Contributor Author

oncletom commented Dec 19, 2018

@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

This comment has been minimized.

Copy link
Member

YoshinoriN commented Dec 20, 2018

@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.

@oncletom

This comment has been minimized.

Copy link
Contributor Author

oncletom commented Dec 29, 2018

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

@YoshinoriN

This comment has been minimized.

Copy link
Member

YoshinoriN commented Dec 30, 2018

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

@oncletom

This comment has been minimized.

Copy link
Contributor Author

oncletom commented Dec 30, 2018

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
2 checks passed
2 checks passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
coverage/coveralls Coverage remained the same at 100.0%
Details
@YoshinoriN

This comment has been minimized.

Copy link
Member

YoshinoriN commented Jan 1, 2019

Thanks. Done !

@oncletom

This comment has been minimized.

Copy link
Contributor Author

oncletom commented Jan 1, 2019

Thank you 🙂

@oncletom

This comment has been minimized.

Copy link
Contributor Author

oncletom commented Jan 23, 2019

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

@YoshinoriN

This comment has been minimized.

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 ?

@oncletom

This comment has been minimized.

Copy link
Contributor Author

oncletom 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
Projects
None yet
3 participants
You can’t perform that action at this time.