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: custom template #110

Merged
merged 8 commits into from
Nov 27, 2019
Merged

feat: custom template #110

merged 8 commits into from
Nov 27, 2019

Conversation

curbengh
Copy link
Contributor

@curbengh curbengh commented Nov 19, 2019

As suggested in #101 (comment), cc @freak3dot

How to test:

package.json
-  "hexo-generator-feed": "^2.0.0"
+  "hexo-generator-feed": "curbengh/hexo-generator-feed#custom-template"
$ rm -rf node_modules/ && npm i
_config.yml
# Optional, prevent custom.xml from being copied into public/ folder
exclude:
  - 'custom.xml'
feed:
  type: 'atom'
  template: './source/custom.xml'
$ hexo clean && hexo g

Following configs are supported:

feed:
  type:
    - 'atom'
    - 'rss2'
  template:
    - './source/_atom.xml'
    - './source/_rss2.xml'
feed:
  type:
    - 'atom'
    - 'rss2'
  template:
    - './source/_atom.xml'
  # rss2 uses the default template instead

@coveralls
Copy link

coveralls commented Nov 19, 2019

Coverage Status

Coverage remained the same at 100.0% when pulling 2e54192 on curbengh:custom-template into 6e5bb89 on hexojs:master.

@curbengh curbengh requested a review from a team November 19, 2019 01:45
@curbengh curbengh changed the title Custom template feat: custom template Nov 19, 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!

index.js Outdated Show resolved Hide resolved
@curbengh curbengh merged commit 8d8ac72 into hexojs:master Nov 27, 2019
@curbengh curbengh deleted the custom-template branch November 27, 2019 07:43
@curbengh curbengh mentioned this pull request Nov 27, 2019
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