buttercms 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a982631a9e6a1eca796107fd7936215df64e7899
|
4
|
+
data.tar.gz: 17720c376778e94c49b3aada430c34fb6b86223f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ef4afaa023947fa991dbd53abc2bd8e0a2259223a01a6125bb3f28f77ffd63b16033e2405a2e840134ad94241a9eed90513e6e1d07755f8bd2b9085893d2a8a9
|
7
|
+
data.tar.gz: 93c1bd769c5caaa9b39348febd5d4fc981d6cfb5708f91ca3feaebe97dd8a54bc8843a81e9e41e451287ee915f56e14db00cabf46461110c3f233c7e2db8f08e
|
data/README.rst
CHANGED
@@ -13,12 +13,15 @@ Butter provides a user friendly blogging UI, hosted on buttercms.com, and expose
|
|
13
13
|
This package provides a Rails Engine that interacts with the Butter API to get you up and running in seconds.
|
14
14
|
|
15
15
|
|
16
|
-
Feeds
|
16
|
+
Sitemap + Feeds
|
17
17
|
=====================
|
18
|
-
Your new blog comes built-in with a RSS + Atom feeds for maximum SEO benefit. You can use these to syndicate your content to social networks,
|
18
|
+
Your new blog comes built-in with a sitemap.xml, RSS + Atom feeds for maximum SEO benefit. You can use these to syndicate your content to social networks, improve search engine indexation, and more.
|
19
19
|
|
20
|
-
|
21
|
-
|
20
|
+
Sitemap: http://localhost:3000/blog/sitemap.xml (named route :blog_sitemap)
|
21
|
+
|
22
|
+
RSS: http://localhost:3000/blog/rss/ (named route :blog_rss)
|
23
|
+
|
24
|
+
Atom: http://localhost:3000/blog/atom/ (named route :blog_atom)
|
22
25
|
|
23
26
|
|
24
27
|
============
|
@@ -126,23 +126,20 @@ module Buttercms
|
|
126
126
|
end
|
127
127
|
|
128
128
|
|
129
|
-
def
|
130
|
-
|
129
|
+
def butter_feed
|
131
130
|
response = make_butter_request("#{API_URL}posts/")
|
132
131
|
response_json = JSON.parse(response)
|
133
132
|
@recent_posts = response_json['results']
|
134
|
-
|
135
133
|
respond_to do |format|
|
136
134
|
format.rss { render layout: false }
|
137
135
|
format.atom { render layout: false }
|
138
136
|
end
|
137
|
+
end
|
139
138
|
|
140
|
-
|
141
|
-
#
|
142
|
-
|
143
|
-
|
144
|
-
# format.rss { redirect_to feed_path(:format => :atom), :status => :moved_permanently }
|
145
|
-
# end
|
139
|
+
def butter_sitemap
|
140
|
+
response = make_butter_request("#{API_URL}sitemap/")
|
141
|
+
response_json = JSON.parse(response)
|
142
|
+
@recent_posts = response_json
|
146
143
|
end
|
147
144
|
|
148
145
|
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<urlset
|
3
|
+
xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
|
4
|
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
5
|
+
xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9
|
6
|
+
http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd">
|
7
|
+
|
8
|
+
<% @recent_posts.each do |post| %>
|
9
|
+
<url>
|
10
|
+
<loc><%= post['url'] %></loc>
|
11
|
+
</url>
|
12
|
+
<% end %>
|
13
|
+
</urlset>
|
data/config/routes.rb
CHANGED
@@ -2,8 +2,10 @@ Buttercms::Engine.routes.draw do
|
|
2
2
|
get '/' => 'blog#butter_home', as: :blog
|
3
3
|
|
4
4
|
# Feeds
|
5
|
-
get '/rss/' => 'blog#
|
6
|
-
get '/atom/' => 'blog#
|
5
|
+
get '/rss/' => 'blog#butter_feed', :format => 'rss', as: :blog_rss
|
6
|
+
get '/atom/' => 'blog#butter_feed', :format => 'atom', as: :blog_atom
|
7
|
+
get '/sitemap.xml' => 'blog#butter_sitemap', :format => 'xml', as: :blog_sitemap
|
8
|
+
|
7
9
|
|
8
10
|
get '/page/:page' => 'blog#butter_home', as: :archive
|
9
11
|
get '/author/:author_slug' => 'blog#butter_author', as: :blog_author
|
data/lib/buttercms/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: buttercms
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ButterCms
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-07-
|
11
|
+
date: 2015-07-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: json
|
@@ -85,6 +85,7 @@ files:
|
|
85
85
|
- app/assets/stylesheets/buttercms/application.css
|
86
86
|
- app/controllers/buttercms/blog_controller.rb
|
87
87
|
- app/helpers/buttercms/application_helper.rb
|
88
|
+
- app/views/buttercms/blog/butter_sitemap.xml.erb
|
88
89
|
- app/views/buttercms/blog/feed.atom.builder
|
89
90
|
- app/views/buttercms/blog/feed.rss.builder
|
90
91
|
- app/views/layouts/buttercms/application.html.erb
|