buttercms 0.2.4 → 0.2.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.rst +1 -1
- data/lib/buttercms/version.rb +1 -1
- data/lib/generators/templates/post.html.erb +15 -0
- data/test/buttercms_test.rb +2 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c4c070a89a170e8dbdc7f84b1edbb13d8c93bec1
|
4
|
+
data.tar.gz: 24fb2c9c3a8d55e6812a304d4986098cfb856dfd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 369c736d0d881b1ade142c2779b66e02508c622ba756c107f920704e681438ed7cbce75404bbab116c09fb3c90659a40c90db626322208173a66e4a192527e55
|
7
|
+
data.tar.gz: f279f5152b3056cd65176eb738dd464fa05ed25de9350a70381c49ce19a44b5dc2368d4a619f863c3a7b7a082d805d021f210623e899f2855df027b88bf8d1ff
|
data/README.rst
CHANGED
@@ -58,7 +58,7 @@ Log into https://buttercms.com/ to start blogging!
|
|
58
58
|
Customizing your blog
|
59
59
|
=====================
|
60
60
|
|
61
|
-
|
61
|
+
We’ve provided you with a pre-scaffolded blog. Simply crack open any of the files in the newly created /blog/ directory you created in the step above and modify those templates as you would any other. Customizing your blog is now the same flow as the rest of your site! No longer do you have to hack Wordpress PHP scripts.
|
62
62
|
|
63
63
|
Specify the Blog Layout
|
64
64
|
-----------------------
|
data/lib/buttercms/version.rb
CHANGED
@@ -23,6 +23,12 @@ For reference, @post has the following attributes:
|
|
23
23
|
"slug": "the-state-of-company-blogs",
|
24
24
|
"title": "The State of Company Blogs",
|
25
25
|
"featured_image": "http://www.example.com/image.png",
|
26
|
+
"next_post": null,
|
27
|
+
"previous_post": {
|
28
|
+
"slug": "customizable-seo-slugs-for-your-posts",
|
29
|
+
"title": "Customizable SEO slugs for your posts",
|
30
|
+
"featured_image": ""
|
31
|
+
},
|
26
32
|
"body": "<h3>The problem</h3><p>Countless people and essentially every...</p>",
|
27
33
|
"summary": <h3>The problem</h3><p>Countless people and essentially...</p>,
|
28
34
|
"status": "published"
|
@@ -52,6 +58,15 @@ For reference, @post has the following attributes:
|
|
52
58
|
</p>
|
53
59
|
</div>
|
54
60
|
|
61
|
+
<ul class="pager">
|
62
|
+
<% if @post['previous_post'] %>
|
63
|
+
<li class="previous"><%= link_to("← Previous post".html_safe, blog_post_path(:slug => @post['previous_post']['slug'])) %></li>
|
64
|
+
<% end %>
|
65
|
+
|
66
|
+
<% if @post['next_post'] %>
|
67
|
+
<li class="next"><%= link_to("Next post →".html_safe, blog_post_path(:slug => @post['next_post']['slug'])) %></li>
|
68
|
+
<% end %>
|
69
|
+
</ul>
|
55
70
|
|
56
71
|
<!--
|
57
72
|
// For post comments, we recommend https://disqus.com/
|
data/test/buttercms_test.rb
CHANGED
@@ -60,6 +60,8 @@ module Buttercms
|
|
60
60
|
assert_equal post['summary'], 'This is a blog post to test the API.'
|
61
61
|
assert_equal post['featured_image'], ''
|
62
62
|
assert_equal post['status'], 'published'
|
63
|
+
assert_equal post['next_post'], nil
|
64
|
+
assert_equal post['previous_post'], nil
|
63
65
|
|
64
66
|
author = post['author']
|
65
67
|
assert_equal author['first_name'], 'API'
|
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.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ButterCms
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-10-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: json
|