blog_boi 0.0.5 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +4 -4
- data/app/controllers/blog_boi/application_controller.rb +3 -1
- data/app/controllers/blog_boi/articles_controller.rb +5 -1
- data/app/views/blog_boi/articles/_article.html.erb +1 -1
- data/app/views/blog_boi/articles/_form.html.erb +5 -0
- data/app/views/blog_boi/articles/edit.html.erb +1 -1
- data/app/views/layouts/blog_boi/_head_meta_tags.html.erb +8 -3
- data/app/views/layouts/blog_boi/_header.html.erb +1 -1
- data/lib/blog_boi.rb +3 -2
- data/lib/blog_boi/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9c5cc595c8dd15f8c7a97ab65949edfe3bf19b160361f7aaa9538e2e1e100fea
|
4
|
+
data.tar.gz: 925ed2e0e1e534a2fbbdb9d825fc3a8a180198286425771bd9c05341588272a0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 208f56f327f2f73ef8ac38796b82a6f2df03057f7c9fc04234c198d3f12f085ef73f31b52c9d8161c679c8b505aa0fabd1390f0065a3f9c355c95ee59e4fa505
|
7
|
+
data.tar.gz: 13ed0d6b30ee39cd2a34631bd5ac62c917b43206efba174d33d61f73e3d2919603321572fa5a43dc33ed136d128ee5c1b135b43a02bb4db49d47b7421cc4076a
|
data/README.md
CHANGED
@@ -2,7 +2,9 @@ By [Charlie Reese](https://charliereese.ca/about) at [Clientelify](https://clien
|
|
2
2
|
|
3
3
|
# BlogBoi
|
4
4
|
|
5
|
-
BlogBoi is a rails gem / engine that provides out-of-the-box blogging functionality to your rails application
|
5
|
+
BlogBoi is a rails gem / engine that provides out-of-the-box blogging functionality to your rails application.
|
6
|
+
|
7
|
+
It requires active_storage for photo upload / storage.
|
6
8
|
|
7
9
|
## Installation
|
8
10
|
|
@@ -12,8 +14,6 @@ BlogBoi is a rails gem / engine that provides out-of-the-box blogging functional
|
|
12
14
|
gem 'blog_boi', '~> 0'
|
13
15
|
```
|
14
16
|
|
15
|
-
_Note: path may move to github and not be relative_
|
16
|
-
|
17
17
|
2. Add these lines to your config/application.rb file:
|
18
18
|
|
19
19
|
```ruby
|
@@ -63,7 +63,7 @@ mount BlogBoi::Engine, at: "/blog"
|
|
63
63
|
BlogBoi.author_class = "User" # name of active record model containing authors with property called name (for author's name)
|
64
64
|
```
|
65
65
|
|
66
|
-
See lib/blog_boi.rb for all customization options.
|
66
|
+
See lib/blog_boi.rb for all customization options (like setting your Blog's meta description / image).
|
67
67
|
|
68
68
|
7. Finally, your parent application must define the method `admin_signed_in?`. If you are using Devise, this method may already exist. It should return true if the blog admin is signed in, and false if not. When it returns true, you may create, update, and destroy blog articles. It should be available in controllers and views; it should be defined in ApplicationController, and should be marked a helper method. E.g.
|
69
69
|
|
@@ -15,7 +15,11 @@ module BlogBoi
|
|
15
15
|
|
16
16
|
# GET /articles/1
|
17
17
|
def show
|
18
|
-
@meta_tags
|
18
|
+
@meta_tags = {
|
19
|
+
title: @article.title,
|
20
|
+
description: @article.description,
|
21
|
+
image: @article.image.attached? ? main_app.url_for(@article.image) : nil,
|
22
|
+
}
|
19
23
|
end
|
20
24
|
|
21
25
|
# GET /articles/new
|
@@ -24,6 +24,11 @@
|
|
24
24
|
<%= form.text_field :title, placeholder: 'e.g. Great Title: 3 Reasons Why', class: 'form-control' %>
|
25
25
|
</div>
|
26
26
|
|
27
|
+
<div class="field mt-3">
|
28
|
+
<%= form.label :description %>
|
29
|
+
<%= form.text_field :description, placeholder: 'e.g. The 3 reasons why you must use the BlogBoi engine', class: 'form-control' %>
|
30
|
+
</div>
|
31
|
+
|
27
32
|
<div class="field mt-3">
|
28
33
|
<%= form.label :slug %>
|
29
34
|
<%= form.text_field :slug, placeholder: 'e.g. appointment-reminders-for-dentists', class: 'form-control' %>
|
@@ -1,7 +1,12 @@
|
|
1
|
-
<title
|
1
|
+
<title>
|
2
|
+
<%= @meta_tags[:title] || company_name + ' Blog' %>
|
3
|
+
</title>
|
2
4
|
<meta property="og:title" content="<%= @meta_tags[:title] || blog_seo_title %>" />
|
3
5
|
|
6
|
+
<meta name="description" content="<%= @meta_tags[:description] || blog_seo_description %>" />
|
7
|
+
<meta property="og:description" content="<%= @meta_tags[:description] || blog_seo_description %>" />
|
8
|
+
|
4
9
|
<meta property="og:site_name" content="<%= company_name %>" />
|
10
|
+
<meta property="og:type" content="article">
|
5
11
|
|
6
|
-
<meta
|
7
|
-
<meta property="og:description" content="<%= @meta_tags[:description] || blog_seo_description %>" />
|
12
|
+
<meta property="og:image" content="<%= @meta_tags[:image] %>"/>
|
@@ -16,7 +16,7 @@
|
|
16
16
|
|
17
17
|
<div class="col-12 col-md-6 col-lg-5 text-primary-light font-weight-light mt-3 mt-md-0">
|
18
18
|
<em>
|
19
|
-
Brought to you by <a href="/" class="text-orange"><%= company_name %></a>,
|
19
|
+
Brought to you by <a href="/" class="text-orange"><%= company_name %></a>, <%= company_description %>
|
20
20
|
</em>
|
21
21
|
</div>
|
22
22
|
|
data/lib/blog_boi.rb
CHANGED
@@ -3,7 +3,7 @@ require "blog_boi/error_classes"
|
|
3
3
|
|
4
4
|
module BlogBoi
|
5
5
|
mattr_accessor :author_class, :company_name, :company_logo_path, :company_description, :blog_description,
|
6
|
-
:blog_seo_description, :blog_seo_title
|
6
|
+
:blog_seo_description, :blog_seo_title, :blog_meta_image
|
7
7
|
|
8
8
|
class << self
|
9
9
|
def author_class
|
@@ -20,11 +20,12 @@ module BlogBoi
|
|
20
20
|
|
21
21
|
# Company info
|
22
22
|
self.company_name = 'SaaSy'
|
23
|
-
self.company_description = 'business that does xyz'
|
23
|
+
self.company_description = 'A business that does xyz'
|
24
24
|
self.company_logo_path = 'blog_boi/logo'
|
25
25
|
|
26
26
|
# Blog info
|
27
27
|
self.blog_description = 'We help your business reduce no-shows, get more reviews, and increase sales and productivity: detailed tutorials and insight from business owners and experts'
|
28
28
|
self.blog_seo_description = blog_description
|
29
29
|
self.blog_seo_title = blog_seo_title
|
30
|
+
self.blog_meta_image = 'blog_boi/logo'
|
30
31
|
end
|
data/lib/blog_boi/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: blog_boi
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Charlie Reese
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-12-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: kramdown
|