phcdevworks_titleseo 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 764a83900a74ffcf2a8a23d0ce8e6ae434d5cde69eb6e49f1485d64b8d595359
4
+ data.tar.gz: da678dd4a508432fe2a7ce5ff83d479b6411a768f91b9fec0a5059c3d26a1b97
5
+ SHA512:
6
+ metadata.gz: cb8d2ddf6664dcccf521849e5e80ee9122336cefd0aa337716dc62faf116ad79051f18dccc48ba8a2dace90cdbfd346c47a5cc79da1d963748a59fdde7da3c0c
7
+ data.tar.gz: bc8f1e24e84b225275d8b462258a98055a3d1712e14e3e97e5dbf6435c7380b17cab1807163dbc830c51cb6b1c8b9c83608226c542a495656a56dd1befb29c30
data/MIT-LICENSE ADDED
@@ -0,0 +1,20 @@
1
+ Copyright 2019
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,57 @@
1
+ ### PHCDevworks-TitleSEO for Rails6 (Page SEO, Titles & Title Tags) Documentation
2
+
3
+ PHCDevworks Title/SEO Rails6 engine with helpers for page headings, taglines, SEO and title tags.
4
+
5
+ * A dynamic way to add different page headings, taglines, SEO and title tags.
6
+ * Setup in seconds with only one line of code in the application_helper file.
7
+ * Save time and keep your rails projects manageable, tidy and secure.
8
+
9
+ #### Step 1 - Add PHCDevworks-TitleSEO to your gemfile
10
+
11
+ gem 'phcdevworks_titleseo'
12
+ bundle install
13
+
14
+ #### Step 2 - Load Helpers in the Application's Controller
15
+ Add the line of code below into your app/controllers/application_controller.rb (application's controller file).
16
+
17
+ helper PhcdevworksTitleseo::Engine.helpers
18
+
19
+ #### Step 3 - Provide values for Titles & Subtitles
20
+ **Page Titles** - At the top of the page, view add the hidden lines of code below.
21
+
22
+ <% phc_title "Example Title" %>
23
+ <% phc_title_tagline "Example Tagline" %>
24
+
25
+ **Page SEO** - At the top of your layout view file add the hidden lines of code below.
26
+
27
+ <% phc_seo_title "Example SEO Page Title" %>
28
+ <% phc_seo_description "Example SEO Page Description" %>
29
+
30
+ **Page Static BreadCrumbs** - At the top of the page, view add the hidden lines of code below.
31
+
32
+ <% phc_breadcrumb_one "Example News" %>
33
+ <% phc_breadcrumb_two "Article" %>
34
+ <% phc_breadcrumb_three "Index" %>
35
+
36
+ #### Add Titles to a Page
37
+ Add the code below in your views whenever page titles are required (can be used unlimited number of times).
38
+
39
+ <%= yield(:phc_title) %>
40
+
41
+ #### Add Subtitles/Title Tags to your Pagefile
42
+ Add the code below to your views whenever page subtitles are required (can also be used an unlimited number of times).
43
+
44
+ <%= yield(:phc_title_tagline) %>
45
+
46
+ #### Add SEO Tags to your Layout file
47
+
48
+ <title><%= yield(:phc_seo_title) %></title>
49
+ <meta name="description" content=<%= yield(:phc_seo_description) %>"">
50
+
51
+ #### Add static BreadCrumbs to your Pagefile
52
+
53
+ <ol class="breadcrumb">
54
+ <li><%= yield(:phc_breadcrumb_one) %></li>
55
+ <li><%= yield(:phc_breadcrumb_two) %></li>
56
+ <li class="active"><%= yield(:phc_breadcrumb_three) %></li>
57
+ </ol>
data/Rakefile ADDED
@@ -0,0 +1,32 @@
1
+ begin
2
+ require 'bundler/setup'
3
+ rescue LoadError
4
+ puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
5
+ end
6
+
7
+ require 'rdoc/task'
8
+
9
+ RDoc::Task.new(:rdoc) do |rdoc|
10
+ rdoc.rdoc_dir = 'rdoc'
11
+ rdoc.title = 'PhcdevworksTitleseo'
12
+ rdoc.options << '--line-numbers'
13
+ rdoc.rdoc_files.include('README.md')
14
+ rdoc.rdoc_files.include('lib/**/*.rb')
15
+ end
16
+
17
+ APP_RAKEFILE = File.expand_path("test/test_app/Rakefile", __dir__)
18
+ load 'rails/tasks/engine.rake'
19
+
20
+ load 'rails/tasks/statistics.rake'
21
+
22
+ require 'bundler/gem_tasks'
23
+
24
+ require 'rake/testtask'
25
+
26
+ Rake::TestTask.new(:test) do |t|
27
+ t.libs << 'test'
28
+ t.pattern = 'test/**/*_test.rb'
29
+ t.verbose = false
30
+ end
31
+
32
+ task default: :test
@@ -0,0 +1,3 @@
1
+ //= link_tree ../images
2
+ //= link_directory ../javascripts/phcdevworks_titleseo .js
3
+ //= link_directory ../stylesheets/phcdevworks_titleseo .scss
@@ -0,0 +1,15 @@
1
+ /*
2
+ * This is a manifest file that'll be compiled into application.css, which will include all the files
3
+ * listed below.
4
+ *
5
+ * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
6
+ * or any plugin's vendor/assets/stylesheets directory can be referenced here using a relative path.
7
+ *
8
+ * You're free to add application-wide styles to this file and they'll appear at the bottom of the
9
+ * compiled file so the styles you add here take precedence over styles defined in any other CSS/SCSS
10
+ * files in this directory. Styles in this file should be added after the last require_* statement.
11
+ * It is generally better to create a new file per style scope.
12
+ *
13
+ *= require_tree .
14
+ *= require_self
15
+ */
@@ -0,0 +1,5 @@
1
+ module PhcdevworksTitleseo
2
+ class ApplicationController < ActionController::Base
3
+ protect_from_forgery with: :exception
4
+ end
5
+ end
@@ -0,0 +1,36 @@
1
+ module PhcdevworksTitleseo
2
+ module ApplicationHelper
3
+
4
+ # Helpers for Page SEO
5
+ def phc_seo_title(phc_page_seo_title)
6
+ content_for :phc_seo_title, phc_page_seo_title.to_s
7
+ end
8
+
9
+ def phc_seo_description(phc_page_seo_description)
10
+ content_for :phc_seo_description, phc_page_seo_description.to_s
11
+ end
12
+
13
+ # Helpers for Page Title & Sub Title
14
+ def phc_title(phc_page_title)
15
+ content_for :phc_title, phc_page_title.to_s
16
+ end
17
+
18
+ def phc_title_tagline(phc_page_title_tagline)
19
+ content_for :phc_title_tagline, phc_page_title_tagline.to_s
20
+ end
21
+
22
+ # Helpers for BreadCrumbs
23
+ def phc_breadcrumb_one(phc_page_breadcrumb_one)
24
+ content_for :phc_breadcrumb_one, phc_page_breadcrumb_one.to_s
25
+ end
26
+
27
+ def phc_breadcrumb_two(phc_page_breadcrumb_two)
28
+ content_for :phc_breadcrumb_two, phc_page_breadcrumb_two.to_s
29
+ end
30
+
31
+ def phc_breadcrumb_three(phc_page_breadcrumb_three)
32
+ content_for :phc_breadcrumb_three, phc_page_breadcrumb_three.to_s
33
+ end
34
+
35
+ end
36
+ end
@@ -0,0 +1,4 @@
1
+ module PhcdevworksTitleseo
2
+ class ApplicationJob < ActiveJob::Base
3
+ end
4
+ end
@@ -0,0 +1,6 @@
1
+ module PhcdevworksTitleseo
2
+ class ApplicationMailer < ActionMailer::Base
3
+ default from: 'from@example.com'
4
+ layout 'mailer'
5
+ end
6
+ end
@@ -0,0 +1,5 @@
1
+ module PhcdevworksTitleseo
2
+ class ApplicationRecord < ActiveRecord::Base
3
+ self.abstract_class = true
4
+ end
5
+ end
@@ -0,0 +1,15 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>Phcdevworks titleseo</title>
5
+ <%= csrf_meta_tags %>
6
+ <%= csp_meta_tag %>
7
+
8
+ <%= stylesheet_link_tag "phcdevworks_titleseo/application", media: "all" %>
9
+ </head>
10
+ <body>
11
+
12
+ <%= yield %>
13
+
14
+ </body>
15
+ </html>
@@ -0,0 +1,5 @@
1
+ <ol class="breadcrumb">
2
+ <li><%= yield(:phc_breadcrumb_one) %></li>
3
+ <li><%= yield(:phc_breadcrumb_two) %></li>
4
+ <li class="active"><%= yield(:phc_breadcrumb_three) %></li>
5
+ </ol>
@@ -0,0 +1,2 @@
1
+ <title><%= yield(:phc_seo_title) %></title>
2
+ <meta name="description" content=<%= yield(:phc_seo_description) %>"">
@@ -0,0 +1,2 @@
1
+ <h1><%= yield(:phc_title) %></h1>
2
+ <span><%= yield(:phc_title_tagline) %></span>
data/config/routes.rb ADDED
@@ -0,0 +1,2 @@
1
+ PhcdevworksTitleseo::Engine.routes.draw do
2
+ end
@@ -0,0 +1,5 @@
1
+ require "phcdevworks_titleseo/engine"
2
+
3
+ module PhcdevworksTitleseo
4
+ # Your code goes here...
5
+ end
@@ -0,0 +1,11 @@
1
+ module PhcdevworksTitleseo
2
+ class Engine < ::Rails::Engine
3
+
4
+ # Load Asset Dependencies
5
+ require "sassc-rails"
6
+
7
+ # Plugin Namespace
8
+ isolate_namespace PhcdevworksTitleseo
9
+
10
+ end
11
+ end
@@ -0,0 +1,3 @@
1
+ module PhcdevworksTitleseo
2
+ VERSION = '0.1.0'
3
+ end
@@ -0,0 +1,4 @@
1
+ # desc "Explaining what the task does"
2
+ # task :phcdevworks_titleseo do
3
+ # # Task goes here
4
+ # end
metadata ADDED
@@ -0,0 +1,105 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: phcdevworks_titleseo
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - PHCDevworks
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2019-05-26 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: rails
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: 6.0.0.rc1
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: 6.0.0.rc1
27
+ - !ruby/object:Gem::Dependency
28
+ name: sassc-rails
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '2.1'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '2.1'
41
+ - !ruby/object:Gem::Dependency
42
+ name: sqlite3
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ description: Rails view helpers for page headings, taglines, seo and title tags.
56
+ email:
57
+ - developers@phcdevworks.com
58
+ executables: []
59
+ extensions: []
60
+ extra_rdoc_files: []
61
+ files:
62
+ - MIT-LICENSE
63
+ - README.md
64
+ - Rakefile
65
+ - app/assets/config/phcdevworks_titleseo_manifest.js
66
+ - app/assets/javascripts/phcdevworks_titleseo/application.js
67
+ - app/assets/stylesheets/phcdevworks_titleseo/application.css
68
+ - app/controllers/phcdevworks_titleseo/application_controller.rb
69
+ - app/helpers/phcdevworks_titleseo/application_helper.rb
70
+ - app/jobs/phcdevworks_titleseo/application_job.rb
71
+ - app/mailers/phcdevworks_titleseo/application_mailer.rb
72
+ - app/models/phcdevworks_titleseo/application_record.rb
73
+ - app/views/layouts/phcdevworks_titleseo/application.html.erb
74
+ - app/views/phcdevworks_titleseo/_page_breadcrumbs.html.erb
75
+ - app/views/phcdevworks_titleseo/_page_seo.html.erb
76
+ - app/views/phcdevworks_titleseo/_page_titles.html.erb
77
+ - config/routes.rb
78
+ - lib/phcdevworks_titleseo.rb
79
+ - lib/phcdevworks_titleseo/engine.rb
80
+ - lib/phcdevworks_titleseo/version.rb
81
+ - lib/tasks/phcdevworks_titleseo_tasks.rake
82
+ homepage: https://phcdevworks.com/
83
+ licenses:
84
+ - MIT
85
+ metadata: {}
86
+ post_install_message:
87
+ rdoc_options: []
88
+ require_paths:
89
+ - lib
90
+ required_ruby_version: !ruby/object:Gem::Requirement
91
+ requirements:
92
+ - - ">="
93
+ - !ruby/object:Gem::Version
94
+ version: '0'
95
+ required_rubygems_version: !ruby/object:Gem::Requirement
96
+ requirements:
97
+ - - ">="
98
+ - !ruby/object:Gem::Version
99
+ version: '0'
100
+ requirements: []
101
+ rubygems_version: 3.0.3
102
+ signing_key:
103
+ specification_version: 4
104
+ summary: PHCDevworks - Helpers - PHCTitleSEO
105
+ test_files: []