-
-
Notifications
You must be signed in to change notification settings - Fork 107
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
fix: compatibility with existing theme #114
Conversation
Should we fix #115 in this PR as well? We could create a |
Whether or not this plugin should write back to user config actually doesn't matter, because a theme still need <% if (config.feed) { %>
<% if (config.feed.type.length && config.feed.path.length) { %>
<% if (typeof config.feed.type === 'string' )) { %>
<link rel="alternate" type="application/<%- config.feed.type.replace(/2$/, '') %>+xml" title="<%= config.title %>" href="<%- url_for(config.feed.path) %>">
<% } else { %>
<% for (const i in config.feed.type) { %>
<link rel="alternate" type="application/<%- config.feed.type[i].replace(/2$/, '') %>+xml" title="<%= config.title %>" href="<%- url_for(config.feed.path[i]) %>">
<% } %>
<% } %>
<% } %>
<% } %> to be compatible with both #100 (released in 2.1) and older versions of this plugin. |
We have noticed this problem about the type of |
cc @mikolaje @stevenjoezhang I also noticed the theme doesn't support RSS2 format. Relevant PR yscoder/hexo-theme-indigo#489. |
I will do some research. Compatibility with these core plugins of Hexo is critical to a theme. |
@hexojs/core this is an urgent fix. |
Fixes #112
Existing theme expects
feed.path
to be a string, but previous PR #96 converts it to array. This PR prevents the conversion.cc @mikolaje @yrpang @AlynxZhou @stevenjoezhang