fi_seo 0.1.1 → 0.1.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +1 -1
- data/Gemfile.lock +3 -3
- data/LICENSE.txt +1 -1
- data/README.md +24 -7
- data/fi_seo.gemspec +5 -5
- data/lib/acts_as_seoable/version.rb +1 -1
- data/lib/fi_seo.rb +15 -3
- metadata +10 -12
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ec79f9d7ed68b392e7d636be7de47bb231490d40dd14e78fdbb42160d8d224ab
|
4
|
+
data.tar.gz: 25305cec07b84735ced235f2b1ee492c636a3d043e202abc986f1125bbebb7cb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 99fbf04fecd4a89996ca62f77ff09ffc1f85f9726b7e6155a6b0e902696c5fb9bbd0e10caab0ff453d946b7737c356a3e67223de40e35aed65020452ccbc8046
|
7
|
+
data.tar.gz: 494b72867ed5fbf4b60132e5c0f100f2db0c8437cda1528ec26fa8bc7eb14ce970c03fc3a63e5ffe5427f6fa64fc869c96a2a43fd6f1e76242932956e675367f
|
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
fi_seo (0.1.
|
5
|
-
activerecord (
|
4
|
+
fi_seo (0.1.4)
|
5
|
+
activerecord (>= 5.0, < 6.1)
|
6
6
|
meta-tags (~> 2.13)
|
7
7
|
xml-sitemap (~> 1.3, >= 1.3.3)
|
8
8
|
|
@@ -82,7 +82,7 @@ PLATFORMS
|
|
82
82
|
ruby
|
83
83
|
|
84
84
|
DEPENDENCIES
|
85
|
-
activerecord (
|
85
|
+
activerecord (>= 5.0, < 6.1)
|
86
86
|
fi_seo!
|
87
87
|
meta-tags (~> 2.13)
|
88
88
|
rake (~> 12.0)
|
data/LICENSE.txt
CHANGED
data/README.md
CHANGED
@@ -125,7 +125,7 @@ If the model has attributes for that you need to use for the seoable attributes
|
|
125
125
|
acts_as_seoable :title_seoable, :description, :keywords
|
126
126
|
|
127
127
|
def title_seoable
|
128
|
-
"#{self.name}#{self.id}"
|
128
|
+
"#{self.name}#{self.id}"
|
129
129
|
end
|
130
130
|
```
|
131
131
|
when you create a new record from this model the gem will create a corresponding seoable record as well. Above values will be set as default values.
|
@@ -171,6 +171,23 @@ def twitter_tags
|
|
171
171
|
end
|
172
172
|
```
|
173
173
|
|
174
|
+
For adding dynamic tags to frontend please add meta tags as follows:
|
175
|
+
|
176
|
+
```ruby
|
177
|
+
# some_controller.rb
|
178
|
+
|
179
|
+
def show
|
180
|
+
@user = User.find(params[:id])
|
181
|
+
set_meta_tags @user
|
182
|
+
end
|
183
|
+
```
|
184
|
+
|
185
|
+
For adding dynamic meta tags for existing records please run following:
|
186
|
+
|
187
|
+
```ruby
|
188
|
+
Model.find_each(&:save)
|
189
|
+
```
|
190
|
+
|
174
191
|
### Sitemap
|
175
192
|
|
176
193
|
For sitemap you need to configure as follows:
|
@@ -206,20 +223,20 @@ There are few initializers and generators for this gem to help you to configure
|
|
206
223
|
|
207
224
|
Before using the gem you need to migrate the tables for gem to databalse. To get the migration run the following code:
|
208
225
|
```bash
|
209
|
-
$ acts_as_seoable:migrate
|
226
|
+
$ rails g acts_as_seoable:migrate
|
210
227
|
```
|
211
228
|
#### Gem Initializer
|
212
229
|
This initializer will give ability to set few social configuration and website name for seo and few other things.
|
213
230
|
Run the following code for to create initializer:
|
214
231
|
```bash
|
215
|
-
$ acts_as_seoable:install
|
232
|
+
$ rails g acts_as_seoable:install
|
216
233
|
```
|
217
234
|
#### Active Admin Page
|
218
235
|
*Only if you are using active admin*
|
219
236
|
|
220
237
|
To add SEO data to active admin you need to run following code. This will generate a admin page:
|
221
238
|
```bash
|
222
|
-
$ acts_as_seoable:admin
|
239
|
+
$ rails g acts_as_seoable:admin
|
223
240
|
```
|
224
241
|
|
225
242
|
#### Active Admin View Helper
|
@@ -227,7 +244,7 @@ $ acts_as_seoable:admin
|
|
227
244
|
|
228
245
|
To add active admin view helper you need to run following code. This will generate a **arb** file to add dynamic pages show and edit action:
|
229
246
|
```bash
|
230
|
-
$ acts_as_seoable:admin_view_helper
|
247
|
+
$ rails g acts_as_seoable:admin_view_helper
|
231
248
|
```
|
232
249
|
|
233
250
|
### Active Admin
|
@@ -297,7 +314,7 @@ Got a bug and you're not sure? You're sure you have a bug, but don't know what t
|
|
297
314
|
|
298
315
|
## Contributing
|
299
316
|
|
300
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/
|
317
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/Fidenz/fi_seo. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/Fidenz/fi_seo/blob/master/CODE_OF_CONDUCT.md).
|
301
318
|
|
302
319
|
|
303
320
|
## License
|
@@ -306,4 +323,4 @@ The gem is available as open source under the terms of the [MIT License](https:/
|
|
306
323
|
|
307
324
|
## Code of Conduct
|
308
325
|
|
309
|
-
Everyone interacting in the FiSeo project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/
|
326
|
+
Everyone interacting in the FiSeo project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/Fidenz/fi_seo/blob/master/CODE_OF_CONDUCT.md).
|
data/fi_seo.gemspec
CHANGED
@@ -3,13 +3,13 @@ require_relative 'lib/acts_as_seoable/version'
|
|
3
3
|
Gem::Specification.new do |spec|
|
4
4
|
spec.name = 'fi_seo'
|
5
5
|
spec.version = FiSeo::VERSION
|
6
|
-
spec.authors = ['
|
7
|
-
spec.email = ['info@fidenz.com'
|
6
|
+
spec.authors = ['Fidenz']
|
7
|
+
spec.email = ['info@fidenz.com']
|
8
8
|
|
9
9
|
spec.summary = 'Flexible SEO solution for rails projects'
|
10
10
|
spec.description = 'This gem provides a easier solution to search engine optimization(SEO) in a rails project. This will give you the seo capabilities to your static pages and dynamic pages alike with few lines of code.
|
11
11
|
Also site maps are essential to the SEO of your web application. So this gem gives that capabilities with a feature to integrate google analytics.'
|
12
|
-
spec.homepage = 'https://github.com/
|
12
|
+
spec.homepage = 'https://github.com/Fidenz/fi_seo'
|
13
13
|
spec.license = 'MIT'
|
14
14
|
spec.required_ruby_version = Gem::Requirement.new('>= 2.3.0')
|
15
15
|
|
@@ -23,7 +23,7 @@ Gem::Specification.new do |spec|
|
|
23
23
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
24
24
|
spec.require_paths = ['lib']
|
25
25
|
|
26
|
-
spec.add_runtime_dependency 'activerecord', '
|
27
|
-
spec.add_runtime_dependency
|
26
|
+
spec.add_runtime_dependency 'activerecord', '>= 5.0', '< 6.1'
|
27
|
+
spec.add_runtime_dependency 'meta-tags', '~> 2.13'
|
28
28
|
spec.add_runtime_dependency 'xml-sitemap', '~> 1.3', '>= 1.3.3'
|
29
29
|
end
|
data/lib/fi_seo.rb
CHANGED
@@ -189,15 +189,27 @@ module FiSeo
|
|
189
189
|
end
|
190
190
|
|
191
191
|
def title_value
|
192
|
-
self.
|
192
|
+
if self&.dynamic_seo&.title.present?
|
193
|
+
self.dynamic_seo.title
|
194
|
+
else
|
195
|
+
self.send(self.class.seoable_fields.first) || ''
|
196
|
+
end
|
193
197
|
end
|
194
198
|
|
195
199
|
def description_value
|
196
|
-
self.
|
200
|
+
if self&.dynamic_seo&.description.present?
|
201
|
+
self.dynamic_seo.description
|
202
|
+
else
|
203
|
+
self.send(self.class.seoable_fields.second) || ''
|
204
|
+
end
|
197
205
|
end
|
198
206
|
|
199
207
|
def keywords_value
|
200
|
-
self.
|
208
|
+
if self&.dynamic_seo&.keywords.present?
|
209
|
+
self.dynamic_seo.keywords
|
210
|
+
else
|
211
|
+
self.send(self.class.seoable_fields.third) || ''
|
212
|
+
end
|
201
213
|
end
|
202
214
|
end
|
203
215
|
end
|
metadata
CHANGED
@@ -1,35 +1,35 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fi_seo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
|
-
-
|
7
|
+
- Fidenz
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-09-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '5.0'
|
20
|
-
- - "
|
20
|
+
- - "<"
|
21
21
|
- !ruby/object:Gem::Version
|
22
|
-
version:
|
22
|
+
version: '6.1'
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
26
26
|
requirements:
|
27
|
-
- - "
|
27
|
+
- - ">="
|
28
28
|
- !ruby/object:Gem::Version
|
29
29
|
version: '5.0'
|
30
|
-
- - "
|
30
|
+
- - "<"
|
31
31
|
- !ruby/object:Gem::Version
|
32
|
-
version:
|
32
|
+
version: '6.1'
|
33
33
|
- !ruby/object:Gem::Dependency
|
34
34
|
name: meta-tags
|
35
35
|
requirement: !ruby/object:Gem::Requirement
|
@@ -69,8 +69,6 @@ description: |-
|
|
69
69
|
Also site maps are essential to the SEO of your web application. So this gem gives that capabilities with a feature to integrate google analytics.
|
70
70
|
email:
|
71
71
|
- info@fidenz.com
|
72
|
-
- tech@fidenz.com
|
73
|
-
- banura.r@fidenz.com
|
74
72
|
executables: []
|
75
73
|
extensions: []
|
76
74
|
extra_rdoc_files: []
|
@@ -114,7 +112,7 @@ files:
|
|
114
112
|
- screenshots/static-pages-seoable-details.png
|
115
113
|
- screenshots/static-pages-seoable-frontend.png
|
116
114
|
- screenshots/static-pages-seoable.png
|
117
|
-
homepage: https://github.com/
|
115
|
+
homepage: https://github.com/Fidenz/fi_seo
|
118
116
|
licenses:
|
119
117
|
- MIT
|
120
118
|
metadata: {}
|