buttercms 0.2.5 → 0.2.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/buttercms/version.rb +1 -1
- data/lib/generators/templates/post.html.erb +12 -34
- 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: 72e1323cedd8ce9d959dd54a165e66dee25cf5a5
|
4
|
+
data.tar.gz: 022d163ebb2f2283800ff61e64309fa2ea6a2abd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f41d5119c01f2bdf0c8b460e9206788ca141cd44c56fd5fd4326a6219accc621af43b7278dc1f7673534f845525ed49c4154beb7b8ea28f2e67c7f5234569654
|
7
|
+
data.tar.gz: 3bfec1f7bc5aa609cef1f3bdbd2f5fb91dd9acbdfdd1d680d60b92a827503c5d46d8deafcd26bbcb5ad6a6306d115c61cc396afa872edfce779ddea006c9e76e
|
data/lib/buttercms/version.rb
CHANGED
@@ -1,39 +1,17 @@
|
|
1
|
-
<!--
|
2
|
-
|
1
|
+
<!-- To see a full list of attributes availabile on @post in this template,
|
2
|
+
enter that post slug here: https://buttercms.com/docs/api/#!/posts/Blog_Post_retrieve
|
3
|
+
|
4
|
+
You'll get a real-time response from our API. -->
|
5
|
+
|
6
|
+
|
7
|
+
<!-- For maximum seo, use the 'seo_title' and 'meta_description' attributes on @post to set the <title> and <meta name="description">. Assuming you have content_for?(:head) in your main layout file you can do this: -->
|
8
|
+
<% content_for :head do %>
|
9
|
+
<title><%= @post['seo_title'] %> | Your Site</title>
|
10
|
+
<meta name="description" content="<%= @post['meta_description'] %>">
|
11
|
+
<% end %>
|
3
12
|
|
4
|
-
"url": "https://buttercms.com/blog/the-state-of-company-blogs",
|
5
|
-
"created": "05/16/2015",
|
6
|
-
"published": "05/16/2015",
|
7
|
-
"author": {
|
8
|
-
"first_name": "Butter",
|
9
|
-
"last_name": "Cms",
|
10
|
-
"email": "buttercms@example.com",
|
11
|
-
"slug": "butter-cms"
|
12
|
-
},
|
13
|
-
"categories": [
|
14
|
-
{
|
15
|
-
"name": "blogs",
|
16
|
-
"slug": "blogs"
|
17
|
-
},
|
18
|
-
{
|
19
|
-
"name": "butter",
|
20
|
-
"slug": "butter"
|
21
|
-
}
|
22
|
-
],
|
23
|
-
"slug": "the-state-of-company-blogs",
|
24
|
-
"title": "The State of Company Blogs",
|
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
|
-
},
|
32
|
-
"body": "<h3>The problem</h3><p>Countless people and essentially every...</p>",
|
33
|
-
"summary": <h3>The problem</h3><p>Countless people and essentially...</p>,
|
34
|
-
"status": "published"
|
35
|
-
-->
|
36
13
|
|
14
|
+
<!-- This is the main body of the post page. -->
|
37
15
|
<div class="post-preview">
|
38
16
|
<h2 class="post-title">
|
39
17
|
<%= @post['title'] %>
|
data/test/buttercms_test.rb
CHANGED
@@ -31,6 +31,8 @@ module Buttercms
|
|
31
31
|
assert_equal post['summary'], 'This is a blog post to test the API.'
|
32
32
|
assert_equal post['featured_image'], ''
|
33
33
|
assert_equal post['status'], 'published'
|
34
|
+
assert_equal post['seo_title'], 'This is a blog post'
|
35
|
+
assert_equal post['meta_description'], 'This is a blog post to test the API.'
|
34
36
|
|
35
37
|
author = post['author']
|
36
38
|
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.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ButterCms
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-10-
|
11
|
+
date: 2015-10-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: json
|