caboose-cms 0.9.70 → 0.9.71

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 92965bdaf8d045e2218267b37b2248599f2aa9f0
4
- data.tar.gz: 414d066fcc14ec05e1c162fbe9c757f2255520f4
3
+ metadata.gz: a6383cfb7c9d0346877df3e8e75d78367b7bf0da
4
+ data.tar.gz: cb2096e197b83f9979aec2d8190ee24e3b715de9
5
5
  SHA512:
6
- metadata.gz: 8efedb84c9eb9548d10dfe20d806108f1d56385b2d084c8db7403c5b131c29a39e8ade713a04d98b40092be44192fd58bd9251033bb311984764708b2b85534c
7
- data.tar.gz: ec5d9424298215e0edb274ad00bb2a715acf64f539caf5fb10fec835d8593dd7e08c0e446d5e8933a27d0eda2be54ecc014c9448b6f5968668547193244fe60f
6
+ metadata.gz: fd5a66bcd76e2fc8f1dd76716accb70d6204534a9d570fcfbcaf87e7b9c0dc6f377d012d259c691a6eb02d71065961c3bcb0cdaba0515e18f4dee1851b43d33a
7
+ data.tar.gz: a4cadb96c6b20fbbb16b95e2f90401a1507ba2877e8b425a1361e7bfbd2b8e56efb8e987e5f5b5e73292ab5493c34fd1f9ddcd1c0e48413d9788db4751098ed1
@@ -7,6 +7,14 @@ module Caboose
7
7
  def before_action
8
8
  @page = Page.page_with_uri(request.host_with_port, '/admin')
9
9
  end
10
+
11
+ def sitemap
12
+ respond_to :xml
13
+ end
14
+
15
+ def robots
16
+ respond_to :text
17
+ end
10
18
 
11
19
  # @route GET /admin/sites
12
20
  def admin_index
@@ -739,7 +739,9 @@ class Caboose::Schema < Caboose::Utilities::Schema
739
739
  [ :date_js_updated , :datetime ],
740
740
  [ :date_css_updated , :datetime ],
741
741
  [ :default_layout_id , :integer ],
742
- [ :login_fail_lock_count , :integer , { :default => 5 }]
742
+ [ :login_fail_lock_count , :integer , { :default => 5 }],
743
+ [ :sitemap_xml , :text ],
744
+ [ :robots_txt , :text ]
743
745
  #[ :custom_css , :text ],
744
746
  #[ :custom_css_files , :text ],
745
747
  #[ :custom_js , :text ],
@@ -34,7 +34,9 @@ class Caboose::Site < ActiveRecord::Base
34
34
  :date_js_updated ,
35
35
  :date_css_updated ,
36
36
  :default_layout_id ,
37
- :login_fail_lock_count
37
+ :login_fail_lock_count ,
38
+ :sitemap_xml ,
39
+ :robots_txt
38
40
 
39
41
  before_save :validate_presence_of_store_config
40
42
 
@@ -0,0 +1,5 @@
1
+ <% if @site && !@site.robots_txt.blank? %><%== @site.robots_txt %>
2
+ <% else %>
3
+ User-agent: *
4
+ Disallow: /admin
5
+ <% end %>
@@ -0,0 +1,16 @@
1
+ <% if @site && !@site.sitemap_xml.blank? %><%== @site.sitemap_xml %>
2
+ <% else %>
3
+ <% prim = @site.primary_domain.domain %>
4
+ <?xml version="1.0" encoding="UTF-8"?>
5
+ <urlset
6
+ xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
7
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
8
+ xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9
9
+ http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd">
10
+ <url>
11
+ <loc>http://<%= prim %>/</loc>
12
+ <changefreq>weekly</changefreq>
13
+ <priority>1.00</priority>
14
+ </url>
15
+ </urlset>
16
+ <% end %>
@@ -4,6 +4,9 @@ Caboose::Engine.routes.draw do
4
4
  #if Caboose::use_comment_routes
5
5
  # eval(Caboose::CommentRoutes.controller_routes)
6
6
  #end
7
+
8
+ get "/sitemap.xml" => "sites#sitemap", :format => "xml", :as => :sitemap
9
+ get "/robots.txt" => "sites#robots", :format => "txt", :as => :robots
7
10
 
8
11
  match '*path' => 'pages#show'
9
12
  root :to => 'pages#show'
@@ -1,3 +1,3 @@
1
1
  module Caboose
2
- VERSION = '0.9.70'
2
+ VERSION = '0.9.71'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: caboose-cms
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.70
4
+ version: 0.9.71
5
5
  platform: ruby
6
6
  authors:
7
7
  - William Barry
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-08-28 00:00:00.000000000 Z
11
+ date: 2017-09-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pg
@@ -1216,6 +1216,8 @@ files:
1216
1216
  - app/views/caboose/sites/admin_edit_js.html.erb
1217
1217
  - app/views/caboose/sites/admin_index.html.erb
1218
1218
  - app/views/caboose/sites/admin_new.html.erb
1219
+ - app/views/caboose/sites/robots.text.erb
1220
+ - app/views/caboose/sites/sitemap.xml.erb
1219
1221
  - app/views/caboose/smtp/admin_edit.html.erb
1220
1222
  - app/views/caboose/social/admin_edit.html.erb
1221
1223
  - app/views/caboose/social/analytics.html.erb