Chapters
@@ -9,7 +11,7 @@
<%= image_tag chapter.image.attached? ? chapter.image.url : image_path('chapter.jpg'),
- alt: 'Local meetups photo',
+ alt: chapter.name,
class: "rounded-lg rounded-tl-2xl"
%>
diff --git a/app/views/landing/about.html.erb b/app/views/landing/about.html.erb
index 7458187d..ec46a3e4 100644
--- a/app/views/landing/about.html.erb
+++ b/app/views/landing/about.html.erb
@@ -1,3 +1,5 @@
+<% content_for(:title,"About us") %>
+<% content_for(:description,"The community hosts weekly and monthly meetups in different cities in East Africa. The community brings you Ruby Conference every year with different themes to fill the gap that exist between school and industry and in return helps spur innovation and growth in contribution to global economy") %>
<%= image_tag image_path('workshop.jpg'), class: "pt-20 w-fit h-fit", style: "filter: brightness(40%);" %>
diff --git a/app/views/landing/learn.html.erb b/app/views/landing/learn.html.erb
index c4eeb89e..4743dcb7 100644
--- a/app/views/landing/learn.html.erb
+++ b/app/views/landing/learn.html.erb
@@ -1,3 +1,5 @@
+<% content_for(:title,"Learning Materials") %>
+<% content_for(:description,"A list of ruby and ruby on rails learning resources compiled by the ARC community") %>
Featured learning materials
diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb
index 0215727e..e34842bd 100644
--- a/app/views/layouts/application.html.erb
+++ b/app/views/layouts/application.html.erb
@@ -1,7 +1,8 @@
- ArcPlatform
+ ArcPlatform <%= " - " + yield(:title) if content_for?(:title)%>
+ >
<%= csrf_meta_tags %>
<%= csp_meta_tag %>
diff --git a/config/sitemap.rb b/config/sitemap.rb
new file mode 100644
index 00000000..8be8cda7
--- /dev/null
+++ b/config/sitemap.rb
@@ -0,0 +1,50 @@
+# Set the host name for URL creation
+SitemapGenerator::Sitemap.default_host = "https://rubycommunity.africa"
+SitemapGenerator::Sitemap.compress = false
+
+SitemapGenerator::Sitemap.create do
+ # Put links creation logic here.
+ #
+ # The root path '/' and sitemap index file are added automatically for you.
+ # Links are added to the Sitemap in the order they are specified.
+ #
+ # Usage: add(path, options={})
+ # (default options are used if you don't specify)
+ #
+ # Defaults: :priority => 0.5, :changefreq => 'weekly',
+ # :lastmod => Time.now, :host => default_host
+ #
+ # Examples:
+ #
+ # Add '/articles'
+ #
+ # add articles_path, :priority => 0.7, :changefreq => 'daily'
+ #
+ # Add all articles:
+ #
+ # Article.find_each do |article|
+ # add article_path(article), :lastmod => article.updated_at
+ # end
+
+ add '/about',
+ changefreq: 'monthly',
+ priority: 0.9
+ add '/learn',
+ changefreq: 'monthly',
+ priority: 0.9
+ add '/chapters',
+ changefreq: 'monthly',
+ priority: 0.9
+
+ Chapter.find_each do |chapter|
+ add chapter_path(chapter), :lastmod => chapter.updated_at
+ end
+
+ add '/users/sign_up',
+ changefreq: 'monthly',
+ priority: 0.8
+
+ add '/users/sign_in',
+ changefreq: 'monthly',
+ priority: 0.8
+end
diff --git a/public/robots.txt b/public/robots.txt
index c19f78ab..08e06add 100644
--- a/public/robots.txt
+++ b/public/robots.txt
@@ -1 +1,17 @@
# See https://www.robotstxt.org/robotstxt.html for documentation on how to use the robots.txt file
+User-agent: *
+
+Disallow: /admin
+Disallow: /chapters/new
+Disallow: /chapters/edit
+Disallow: /countries/new
+Disallow: /countries/edit
+Disallow: /projects/new
+Disallow: /projects/edit
+Disallow: /users/
+# Overriding /users route to add the sign in and sign up page to be indexed
+Allow: /users/sign_up
+Allow: /users/sign_in
+
+
+Sitemap: https://rubycommunity.africa/sitemap.xml
\ No newline at end of file
diff --git a/public/sitemap.xml b/public/sitemap.xml
new file mode 100644
index 00000000..84ab9b1d
--- /dev/null
+++ b/public/sitemap.xml
@@ -0,0 +1 @@
+https://rubycommunity.africa2023-05-27T10:44:44+03:00weekly1.0https://rubycommunity.africa/about2023-05-27T10:44:44+03:00monthly0.9https://rubycommunity.africa/learn2023-05-27T10:44:44+03:00monthly0.9https://rubycommunity.africa/chapters2023-05-27T10:44:44+03:00monthly0.9
\ No newline at end of file