hurrymaplelad / docpad-plugin-rss

Generates an RSS feed for a collection of documents
Other
10 stars 6 forks source link

Allow for multiple feeds and adding tests. #3

Closed evantill closed 10 years ago

evantill commented 10 years ago

change the configuration from

config:
    collection: 'html'
    url: '/rss.xml'

to

config:
    default:
        collection: 'html'
        url: '/rss.xml'

you can add other feeds like this

config:
    default:
        collection: 'html'
        url: '/rss.xml'
    mySpecialFeed:
        collection: 'anOtherCollection'
        url: '/rss-special.xml'
evantill commented 10 years ago

updated to be compatible with previous configuration format.

johannesjh commented 10 years ago

I just tried it out. Works great for my site, thank you.

Note, for future reference, and because I just had to find it out the hard way: To try out a (locally installed, potentially modified) docpad plugin:

# clone the plugin
cd ~/repos
git checkout git@github.com:apelsophiebarat/docpad-plugin-rss.git
cd docpad-plugin-rss
# check out whatever branch I want to test using `git checkout <branchname>`
# plus optionally modify the plugin with local changes

# make the local version of the plugin available for linking
npm link

# go to my docpad site and install the local version of the plugin
cd ~/repos/my-docpad-site
docpad install rss   #note: this will install the docpad-plugin-rss package and instruct docpad to make use of it
npm link docpad-plugin-rss   #note: this will switch to the local version

# the site should now be using the local version of the plugin. test it out using:
docpad run

Note: To uninstall / unlink the linked npm package:

cd ~/repos/my-docpad-site/
npm rm -r docpad-plugin-rss   #note: this will remove the link to the local package.
    # see https://github.com/npm/npm/issues/750 for more info on unlinking npm packages
docpad uninstall rss    #note: this will instruct docpad not to use the `docpad-plugin-rss` package anymore
evantill commented 10 years ago

@hurrymaplelad what do you think about my pull request ? I have also discovered (with the added tests) a bug in the rss module used in your plugin. I have fixed it and need to make an other pull request on your project. But my work is based on this pull request...

hurrymaplelad commented 10 years ago

Thanks for the PR, psyched to have tests! Reviewing the code now, but generally looks great.

hurrymaplelad commented 10 years ago

Published as 2.1.3