nanoc-feeds 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +29 -9
  3. data/lib/nanoc/feeds/version.rb +1 -1
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 38ee68d42c7717f804ba0bf46a088cc7f168a86913927ac60f9cd93ded761147
4
- data.tar.gz: d948b44d56cbd42265efe479523eaffc9897f97df0df97d78101baa6deaf8764
3
+ metadata.gz: f33569d2b8cbe63ae3e74aaef6861d55dbfd1f4b3c080be59acc86ba48a738a3
4
+ data.tar.gz: 46ef59228bdeba72b9c3230041a8714e5e075991f9ade4d790e2e9cc2cd2d1e5
5
5
  SHA512:
6
- metadata.gz: 6615e98ee034e0c3fcb06dc33178e9c8a2049e7d2bd1b41661e7cf7170f8d7f2834cdb4afa87971de9d55614f1295034f05d3456bc752abd468e2f70e37baf93
7
- data.tar.gz: 0d183ab7971865aaceb0d18b7da70b1559c666b8826bc325ef82d2493dfea611336a2de7b71694254afd6e8fa9227beba179599eecb355790b18d0f62c5b8ca5
6
+ metadata.gz: 2502f3040990e5209c424849f1e8c9360c5c576dbf6b3c8db23cc2a279723986c58764a37db84728169addb5448ca472873639993f698679b66ed00374a845a6
7
+ data.tar.gz: 36fd5bf1d94df274e88bc53ca5a472b3e60d039ff04efa08ee3c37d342fc6eb7527957b4ccb55b14a8403fa35c2e20c740aabadd073b314180c4863a2a962f23
data/README.md CHANGED
@@ -1,28 +1,48 @@
1
1
  # Nanoc::Feeds
2
2
 
3
- TODO: Delete this and the text below, and describe your gem
4
-
5
- Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/nanoc/feeds`. To experiment with that code, run `bin/console` for an interactive prompt.
3
+ A set of helpers for generating additional feeds in nanoc. Currenntly JSON and Atom feeds are supported.
6
4
 
7
5
  ## Installation
8
6
 
9
- TODO: Replace `UPDATE_WITH_YOUR_GEM_NAME_IMMEDIATELY_AFTER_RELEASE_TO_RUBYGEMS_ORG` with your gem name right after releasing it to RubyGems.org. Please do not do it earlier due to security reasons. Alternatively, replace this section with instructions to install your gem from git if you don't plan to release to RubyGems.org.
10
-
11
7
  Install the gem and add to the application's Gemfile by executing:
12
8
 
13
9
  ```bash
14
- bundle add UPDATE_WITH_YOUR_GEM_NAME_IMMEDIATELY_AFTER_RELEASE_TO_RUBYGEMS_ORG
10
+ bundle add nanoc-feeds
15
11
  ```
16
12
 
17
13
  If bundler is not being used to manage dependencies, install the gem by executing:
18
14
 
19
15
  ```bash
20
- gem install UPDATE_WITH_YOUR_GEM_NAME_IMMEDIATELY_AFTER_RELEASE_TO_RUBYGEMS_ORG
16
+ gem install nanoc-feeds
21
17
  ```
22
18
 
23
19
  ## Usage
24
20
 
25
- TODO: Write usage instructions here
21
+ To generate JSON and Atom feeds add this gem to your `Gemfile` and then include the module in your `lib/helpers.rb` file:
22
+
23
+ ```ruby
24
+ use_helper Nanoc::Feeds::Helpers::Feeds
25
+ ```
26
+
27
+ Now create a `feed.erb` in your content folder using the helper provided:
28
+ ```erb
29
+ <%= feed articles: sorted_articles %>
30
+ ```
31
+
32
+ Finally add the following to your `Rules` file:
33
+ ```ruby
34
+ compile "/feed.erb" do
35
+ filter :erb
36
+ write "/feed.xml"
37
+ end
38
+
39
+ compile "/feed.erb", rep: :json do
40
+ filter :erb
41
+ write "/feed.json"
42
+ end
43
+ ```
44
+
45
+ This will render a JSON (`feed.json`) and Atom (`feed.xml`) feed for your articles.
26
46
 
27
47
  ## Development
28
48
 
@@ -32,7 +52,7 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
32
52
 
33
53
  ## Contributing
34
54
 
35
- Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/nanoc-feeds.
55
+ Bug reports and pull requests are welcome on GitHub at https://github.com/michaelem/nanoc-feeds.
36
56
 
37
57
  ## License
38
58
 
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Nanoc
4
4
  module Feeds
5
- VERSION = "0.1.0"
5
+ VERSION = "0.1.1"
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nanoc-feeds
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Emhofer