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

feat(feed_tag): support parsing config.feed #4029

Merged
merged 3 commits into from
Dec 31, 2019

Conversation

curbengh
Copy link
Contributor

@curbengh curbengh commented Dec 31, 2019

What does it do?

hexojs/hexo-theme-unit-test#25 (comment)

also add type="application/atom+xml" if the type can be determined.

How to test

git clone -b feed_tag-atom-rss https://github.com/curbengh/hexo.git
cd hexo
npm install
npm test

Pull request tasks

  • Add test cases for the changes.
  • Passed the CI test.

@curbengh curbengh requested a review from SukkaW December 31, 2019 04:52
Comment on lines 13 to 14
if (type === 'atom' || path.includes('atom')) typeAttr = 'type="application/atom+xml"';
else if (type.includes('rss') || path.includes('rss')) typeAttr = 'type="application/rss+xml"';
Copy link
Contributor Author

Choose a reason for hiding this comment

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

there is an edge case, feed_tag('feed.xml') and type is not specified; typeAttr will be empty as "feed.xml" can refer to atom or rss.

It's fine to leave it empty since currently this helper doesn't add type="application/atom+xml".

@coveralls
Copy link

Coverage Status

Coverage increased (+0.01%) to 97.1% when pulling 527bf11 on curbengh:feed_tag-atom-rss into 663f1eb on hexojs:master.

@coveralls
Copy link

coveralls commented Dec 31, 2019

Coverage Status

Coverage increased (+0.02%) to 97.103% when pulling f45dda2 on curbengh:feed_tag-atom-rss into 663f1eb on hexojs:master.

SukkaW
SukkaW previously approved these changes Dec 31, 2019
Copy link
Member

@SukkaW SukkaW left a comment

Choose a reason for hiding this comment

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

LGTM!

@curbengh curbengh merged commit 198d818 into hexojs:master Dec 31, 2019
@curbengh curbengh deleted the feed_tag-atom-rss branch December 31, 2019 07:44
@SukkaW SukkaW mentioned this pull request Jul 25, 2020
22 tasks
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.

3 participants