From 5df8de4f94620b1852ff014c4261ec7c9a86965b Mon Sep 17 00:00:00 2001
From: Jah Seng Lee
Date: Sun, 26 Nov 2023 17:07:13 +0800
Subject: [PATCH 1/5] Install meta-tags gem
---
Gemfile | 3 +++
Gemfile.lock | 3 +++
2 files changed, 6 insertions(+)
diff --git a/Gemfile b/Gemfile
index ef4975e..f8882e9 100644
--- a/Gemfile
+++ b/Gemfile
@@ -78,6 +78,9 @@ gem "stripe"
# Markdown support
gem "redcarpet"
+# SEO
+gem "meta-tags"
+
group :development, :test do
# See https://guides.rubyonrails.org/debugging_rails_applications.html#debugging-with-the-debug-gem
gem "debug", platforms: %i[ mri mingw x64_mingw ]
diff --git a/Gemfile.lock b/Gemfile.lock
index 32bff38..e519d65 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -181,6 +181,8 @@ GEM
net-smtp
marcel (1.0.2)
matrix (0.4.2)
+ meta-tags (2.19.0)
+ actionpack (>= 3.2.0, < 7.2)
method_source (1.0.0)
mini_magick (4.11.0)
mini_mime (1.1.5)
@@ -361,6 +363,7 @@ DEPENDENCIES
image_processing (~> 1.8)
jbuilder
jsbundling-rails
+ meta-tags
pagy (~> 6.0)
pg (>= 0.18, < 2.0)
pg_search
From 3354abb108b0b86daa769d83a5767bb6c8039be3 Mon Sep 17 00:00:00 2001
From: Jah Seng Lee
Date: Wed, 29 Nov 2023 15:12:44 +0800
Subject: [PATCH 2/5] Setup favicons
---
.gitignore | 2 +-
app/views/layouts/application.html.erb | 7 +++++++
public/apple-touch-icon.png | Bin 0 -> 5733 bytes
public/favicon.ico | Bin 0 -> 1077 bytes
public/favicon.svg | 1 +
5 files changed, 9 insertions(+), 1 deletion(-)
create mode 100644 public/favicon.svg
diff --git a/.gitignore b/.gitignore
index 576c7de..f14b919 100644
--- a/.gitignore
+++ b/.gitignore
@@ -40,5 +40,5 @@
/node_modules
.byebug_history
-public/
+public/uploads
.yarn/cache
diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb
index 5aaf565..17f0a71 100644
--- a/app/views/layouts/application.html.erb
+++ b/app/views/layouts/application.html.erb
@@ -8,11 +8,18 @@
<% end %>
+
+
+
+
<%= csrf_meta_tags %>
<%= csp_meta_tag %>
<%= stylesheet_link_tag "application", "data-turbo-track": "reload" %>
<%= javascript_include_tag "application", "data-turbo-track": "reload", defer: true %>
+
+ <%= display_meta_tags site: "Nomadstation" %>
+
diff --git a/public/apple-touch-icon.png b/public/apple-touch-icon.png
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..bb74339de950b72b23ec71995fb7848cae2fa9a2 100644
GIT binary patch
literal 5733
zcmd5=i9gia`ya!Ev6Lt#Bip@^Fc?_|gGdTPq(o((F)_BWj3u&!>{6D=*q10v5!p$i
zj9vD%$&hu#wIun?bo<`>{rv~u&%Dk&&*#i@o^zh$G(lbB0-pi{006Gb`nslc
zTE!S_N9f-g-A5GYgb8nY=>njv2l|!%67Fbm8Es?)kfQT!01(r005d~`{sAzZ0)T$;
z0KgR{!GCyDCduD2KmZ^T3t;&zV@aos2SOk8)xRloHq*Zvvw{CeS7kH*%QKcOTW7S;
z3A?-gO*{a=JjxhMu9xi3)3x2iUbFDBFfv5gyWwPQ9o+03WeGTU#wvh10YPVRj$XDR
z1e}X29zoC$`z3*(^NeYjn8+^?FJ}!g3nLQ|9XC%$5hYnUSvfHzSVTlb-O~Y$FxA!j
zy`280A?D=e<&J>Ce0_aoec`fho*0Z<@QAS-D^7~(>}Gi+VkfCwdvZGUN?K19$v>nz<>w6(DbjdbrtN3+$dIThQ`xXZMx3Esb8Db=S65_>Wgmvq20$$H4#m@($9Hy`||Y6nD{S!m#zYz5xi4qm>VlHG-cG
zcc+%j!>by3Pik3S;v;ZS(pHm+%6YAO?wUWKB~aC%=G5v!!IW*ZL;JT6u?V80;QG4_
z%e&*O(`CiD7#J4t+p`4}7UZ-Gog0F#KE|AC3#~~{@yRs~-XpY|m
z>4CZ*s9$liiJSUZufpS1pMx*=6->3_h(XLNrH$LG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.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
From ecd4e4159a4e12293a3bf7dd03945469efe41dc2 Mon Sep 17 00:00:00 2001
From: Jah Seng Lee
Date: Wed, 29 Nov 2023 16:18:04 +0800
Subject: [PATCH 3/5] Add meta tags
---
app/views/channels/new.html.erb | 7 +++++++
app/views/chats/show.html.erb | 13 +++++++------
app/views/choose_plans/show.html.erb | 8 ++++++++
app/views/devise/confirmations/new.html.erb | 9 +++++++++
app/views/devise/passwords/edit.html.erb | 7 +++++++
app/views/devise/passwords/new.html.erb | 9 +++++++++
app/views/devise/registrations/new.html.erb | 9 +++++++++
app/views/devise/sessions/new.html.erb | 9 +++++++++
app/views/home/index.html.erb | 9 +++++++++
app/views/layouts/application.html.erb | 7 -------
app/views/locations/edit.html.erb | 7 +++++++
app/views/locations/show.html.erb | 13 +++++++++----
app/views/profiles/show.html.erb | 9 +++++++++
app/views/reviews/edit.html.erb | 9 +++++++++
app/views/reviews/index.html.erb | 13 +++++++++----
app/views/reviews/new.html.erb | 11 ++++++++++-
app/views/reviews/show.html.erb | 13 +++++++++----
app/views/visa_information/edit.html.erb | 7 +++++++
app/views/visa_information/show.html.erb | 13 +++++++++----
app/views/visas/edit.html.erb | 7 +++++++
app/views/visas/new.html.erb | 7 +++++++
21 files changed, 166 insertions(+), 30 deletions(-)
diff --git a/app/views/channels/new.html.erb b/app/views/channels/new.html.erb
index 0886bb1..ae5713e 100644
--- a/app/views/channels/new.html.erb
+++ b/app/views/channels/new.html.erb
@@ -27,3 +27,10 @@
%>
<% end %>
+
+<%
+ set_meta_tags(
+ index: false,
+ follow: false
+ )
+%>
diff --git a/app/views/chats/show.html.erb b/app/views/chats/show.html.erb
index 10c6935..1b3dd5c 100644
--- a/app/views/chats/show.html.erb
+++ b/app/views/chats/show.html.erb
@@ -1,12 +1,13 @@
- <% if content_for? :page_title %>
- <%= yield :page_title %> | Nomadstation
- <% else %>
- Nomadstation
- <% end %>
-
+ <%
+ # Looks like meta-tags gem doesn't play nice with a custom layout
+ # Just do it manually here
+ %>
+ Nomadstation | <%= @channel.present? ? "#{@channel.name} chat channel" : "Chat" %>
+
+
<%= csrf_meta_tags %>
<%= csp_meta_tag %>
diff --git a/app/views/choose_plans/show.html.erb b/app/views/choose_plans/show.html.erb
index acfb610..3e540fa 100644
--- a/app/views/choose_plans/show.html.erb
+++ b/app/views/choose_plans/show.html.erb
@@ -7,3 +7,11 @@
>
+
+<%
+ set_meta_tags(
+ title: "Choose your Nomadstation plan",
+ index: true,
+ follow: false
+ )
+%>
diff --git a/app/views/devise/confirmations/new.html.erb b/app/views/devise/confirmations/new.html.erb
index 20d75e1..977fa6a 100644
--- a/app/views/devise/confirmations/new.html.erb
+++ b/app/views/devise/confirmations/new.html.erb
@@ -31,3 +31,12 @@
+
+<%
+ set_meta_tags(
+ title: "Resend confirmation instructions",
+ description: "Lost your confirmation email? Fill out this form and we'll send you another.",
+ index: true,
+ follow: true
+ )
+%>
diff --git a/app/views/devise/passwords/edit.html.erb b/app/views/devise/passwords/edit.html.erb
index 0cc4885..c95bb23 100644
--- a/app/views/devise/passwords/edit.html.erb
+++ b/app/views/devise/passwords/edit.html.erb
@@ -40,3 +40,10 @@
+
+<%
+ set_meta_tags(
+ index: false,
+ follow: false
+ )
+%>
diff --git a/app/views/devise/passwords/new.html.erb b/app/views/devise/passwords/new.html.erb
index 4619344..90463ca 100644
--- a/app/views/devise/passwords/new.html.erb
+++ b/app/views/devise/passwords/new.html.erb
@@ -29,3 +29,12 @@
+
+<%
+ set_meta_tags(
+ title: "Forgot your password?",
+ description: "Forgot your password? Fill out this form and we'll send you an email to reset it.",
+ index: true,
+ follow: true
+ )
+%>
diff --git a/app/views/devise/registrations/new.html.erb b/app/views/devise/registrations/new.html.erb
index e407359..9dc8fcd 100644
--- a/app/views/devise/registrations/new.html.erb
+++ b/app/views/devise/registrations/new.html.erb
@@ -96,3 +96,12 @@
+
+<%
+ set_meta_tags(
+ title: "Sign up for your Digital Nomad toolkit and community",
+ description: "An all-in-one toolkit and community for researching destinations, finding up-to-date tailored visa information and meeting other like minded individuals.",
+ index: true,
+ follow: true
+ )
+%>
diff --git a/app/views/devise/sessions/new.html.erb b/app/views/devise/sessions/new.html.erb
index b5d8611..99b07b2 100644
--- a/app/views/devise/sessions/new.html.erb
+++ b/app/views/devise/sessions/new.html.erb
@@ -93,3 +93,12 @@
+
+<%
+ set_meta_tags(
+ title: "Welcome back!",
+ description: "Sign back in to Nomadstation for your personalised Digital Nomad toolkit and community.",
+ index: true,
+ follow: true
+ )
+%>
diff --git a/app/views/home/index.html.erb b/app/views/home/index.html.erb
index 8071f1c..cf60890 100644
--- a/app/views/home/index.html.erb
+++ b/app/views/home/index.html.erb
@@ -20,3 +20,12 @@
}
%>
+
+<%
+ set_meta_tags(
+ title: "A digital nomad toolkit and community",
+ description: "Whether you're researching your next Digital Nomad destination, wanting to make online or in person connections or figuring out which visas you're eligible for, Nomadstation provides everything you need as a modern traveller.",
+ index: true,
+ follow: true
+ )
+%>
diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb
index 17f0a71..524cd77 100644
--- a/app/views/layouts/application.html.erb
+++ b/app/views/layouts/application.html.erb
@@ -1,12 +1,6 @@
- <% if content_for? :page_title %>
- <%= yield :page_title %> | Nomadstation
- <% else %>
- Nomadstation
- <% end %>
-
@@ -19,7 +13,6 @@
<%= javascript_include_tag "application", "data-turbo-track": "reload", defer: true %>
<%= display_meta_tags site: "Nomadstation" %>
-
diff --git a/app/views/locations/edit.html.erb b/app/views/locations/edit.html.erb
index 78db2b5..152565f 100644
--- a/app/views/locations/edit.html.erb
+++ b/app/views/locations/edit.html.erb
@@ -40,3 +40,10 @@
<% end %>
<% end %>
+
+<%
+ set_meta_tags(
+ index: false,
+ follow: false
+ )
+%>
diff --git a/app/views/locations/show.html.erb b/app/views/locations/show.html.erb
index 22febb1..82bce75 100644
--- a/app/views/locations/show.html.erb
+++ b/app/views/locations/show.html.erb
@@ -1,7 +1,3 @@
-<% content_for :page_title do %>
- <%= @location.name %>, <%= @location.country.name %>
-<% end %>
-
<%= render partial: "locations/header",
locals: {
location: @location,
@@ -141,3 +137,12 @@
+
+<%
+ set_meta_tags(
+ title: "#{@location.name_utf8}, #{@location.country.name}",
+ description: helper_location_short_description(location: @location),
+ index: true,
+ follow: true
+ )
+%>
diff --git a/app/views/profiles/show.html.erb b/app/views/profiles/show.html.erb
index c17bf31..3a78c14 100644
--- a/app/views/profiles/show.html.erb
+++ b/app/views/profiles/show.html.erb
@@ -132,3 +132,12 @@
+
+<%
+ set_meta_tags(
+ title: "Update your profile",
+ description: "Customise your Digital Nomad profile to get a tailored experience, made just for you.",
+ index: true,
+ follow: false
+ )
+%>
diff --git a/app/views/reviews/edit.html.erb b/app/views/reviews/edit.html.erb
index d9a68c5..56b8155 100644
--- a/app/views/reviews/edit.html.erb
+++ b/app/views/reviews/edit.html.erb
@@ -16,3 +16,12 @@
}
%>
+
+<%
+ set_meta_tags(
+ title: "Update your review for #{@location.name_utf8}, #{@location.country.name}",
+ description: "Help others with their Digital Nomad adventures by reviewing #{@location.name_utf8}, #{@location.country.name}.",
+ index: true,
+ follow: true
+ )
+%>
diff --git a/app/views/reviews/index.html.erb b/app/views/reviews/index.html.erb
index 34c1242..e07587d 100644
--- a/app/views/reviews/index.html.erb
+++ b/app/views/reviews/index.html.erb
@@ -1,7 +1,3 @@
-<% content_for :page_title do %>
- Reviews for <%= @location.name %>, <%= @location.country.name %>
-<% end %>
-
<%= render partial: "locations/header",
locals: {
location: @location,
@@ -40,3 +36,12 @@
<% end %>
+
+<%
+ set_meta_tags(
+ title: "Reviews for #{@location.name_utf8}, #{@location.country.name}",
+ description: "Still unsure about #{@location.name_utf8} as your next Digital Nomad experience? Find out what other experienced travellers think!",
+ index: true,
+ follow: true
+ )
+%>
diff --git a/app/views/reviews/new.html.erb b/app/views/reviews/new.html.erb
index d9a68c5..a5297ae 100644
--- a/app/views/reviews/new.html.erb
+++ b/app/views/reviews/new.html.erb
@@ -6,7 +6,7 @@
%>
- Review for <%= @location.name_utf8 %>, <%= @location.country.name %>
+ Reviewing <%= @location.name_utf8 %>, <%= @location.country.name %>
<%= render partial: "reviews/shared/form",
@@ -16,3 +16,12 @@
}
%>
+
+<%
+ set_meta_tags(
+ title: "Reviewing #{@location.name_utf8}, #{@location.country.name}",
+ description: "Help others with their Digital Nomad adventures by reviewing #{@location.name_utf8}, #{@location.country.name}.",
+ index: true,
+ follow: true
+ )
+%>
diff --git a/app/views/reviews/show.html.erb b/app/views/reviews/show.html.erb
index 3aedeff..f12cd46 100644
--- a/app/views/reviews/show.html.erb
+++ b/app/views/reviews/show.html.erb
@@ -1,7 +1,3 @@
-<% content_for :page_title do %>
- Review for <%= @location.name %>, <%= @location.country.name %>
- by <%= @review.user.display_name %>
-<% end %>
<%= render partial: "locations/header",
locals: {
@@ -59,3 +55,12 @@
<% end %>
+
+<%
+ set_meta_tags(
+ title: "Review for #{@location.name_utf8}, #{@location.country.name} by #{@review.user.display_name}",
+ description: "Unsure about #{@location.name_utf8} as your next Digital Nomad experience? Find out what #{@review.user.display_name} thinks about #{@location.name}",
+ index: true,
+ follow: true
+ )
+%>
diff --git a/app/views/visa_information/edit.html.erb b/app/views/visa_information/edit.html.erb
index f3d85bd..c703dd5 100644
--- a/app/views/visa_information/edit.html.erb
+++ b/app/views/visa_information/edit.html.erb
@@ -26,3 +26,10 @@
%>
<% end %>
+
+<%
+ set_meta_tags(
+ index: false,
+ follow: false
+ )
+%>
diff --git a/app/views/visa_information/show.html.erb b/app/views/visa_information/show.html.erb
index ed770a9..1575002 100644
--- a/app/views/visa_information/show.html.erb
+++ b/app/views/visa_information/show.html.erb
@@ -1,7 +1,3 @@
-<% content_for :page_title do %>
- <%= @location.name %>, <%= @location.country.name %>
-<% end %>
-
<%= render partial: "locations/header",
locals: {
location: @location,
@@ -104,3 +100,12 @@
<% end %>
+
+<%
+ set_meta_tags(
+ title: "Visa info for #{@location.name_utf8}, #{@location.country.name}",
+ description: "Up to date visa information for #{@location.name}, #{@location.country.name}, specially tailored for you!",
+ index: true,
+ follow: true
+ )
+%>
diff --git a/app/views/visas/edit.html.erb b/app/views/visas/edit.html.erb
index 962728a..8458571 100644
--- a/app/views/visas/edit.html.erb
+++ b/app/views/visas/edit.html.erb
@@ -90,3 +90,10 @@
%>
+
+<%
+ set_meta_tags(
+ index: false,
+ follow: false
+ )
+%>
diff --git a/app/views/visas/new.html.erb b/app/views/visas/new.html.erb
index 0157c1a..6705c03 100644
--- a/app/views/visas/new.html.erb
+++ b/app/views/visas/new.html.erb
@@ -28,3 +28,10 @@
<%= f.submit "Add visa", class: "btn btn-success" %>
<% end %>
+
+<%
+ set_meta_tags(
+ index: false,
+ follow: false
+ )
+%>
From a41bb9970d44ccf390dd155c2dcb4726aa47be7f Mon Sep 17 00:00:00 2001
From: Jah Seng Lee
Date: Wed, 29 Nov 2023 16:25:37 +0800
Subject: [PATCH 4/5] Update copy for joining
---
app/views/devise/registrations/new.html.erb | 6 +++---
app/views/devise/sessions/new.html.erb | 4 ++--
app/views/{ => devise}/shared/_joining_reasons.html.erb | 6 +++---
3 files changed, 8 insertions(+), 8 deletions(-)
rename app/views/{ => devise}/shared/_joining_reasons.html.erb (55%)
diff --git a/app/views/devise/registrations/new.html.erb b/app/views/devise/registrations/new.html.erb
index 9dc8fcd..c0c2220 100644
--- a/app/views/devise/registrations/new.html.erb
+++ b/app/views/devise/registrations/new.html.erb
@@ -86,10 +86,10 @@
-
-
Your digital nomad community
+
+
Your digital nomad toolkit + community
- <%= render partial: "shared/joining_reasons" %>
+ <%= render partial: "devise/shared/joining_reasons" %>
diff --git a/app/views/devise/sessions/new.html.erb b/app/views/devise/sessions/new.html.erb
index 99b07b2..fc00835 100644
--- a/app/views/devise/sessions/new.html.erb
+++ b/app/views/devise/sessions/new.html.erb
@@ -75,13 +75,13 @@
-
+
Haven't got an account?
That's okay! It takes a few quick minutes to sign up and join Nomadstation.
- <%= render partial: "shared/joining_reasons" %>
+ <%= render partial: "devise/shared/joining_reasons" %>
<%= link_to(
"Join now!",
diff --git a/app/views/shared/_joining_reasons.html.erb b/app/views/devise/shared/_joining_reasons.html.erb
similarity index 55%
rename from app/views/shared/_joining_reasons.html.erb
rename to app/views/devise/shared/_joining_reasons.html.erb
index 02e79ce..a6fe370 100644
--- a/app/views/shared/_joining_reasons.html.erb
+++ b/app/views/devise/shared/_joining_reasons.html.erb
@@ -1,9 +1,9 @@
For just $8 a month, you'll get access to:
- A fully moderated user chat
- Visa information, travel information and more for the best nomad locations
+ Personalised visa information, travel recommendations and more for the best nomad locations
Guides, articles and blogs aimed at both seasoned and aspiring Digital Nomads
+ A fully moderated user chat
... and more!
We're a small but growing community.
-Our aim is to build the
Digital Nomad community in the world!
+Our aim is to build the
best Digital Nomad toolkit and community in the world.
From 5c0854fe96df0e1d7b8dacb830fd687fc29b8e3a Mon Sep 17 00:00:00 2001
From: Jah Seng Lee
Date: Wed, 29 Nov 2023 16:30:17 +0800
Subject: [PATCH 5/5] Update feature test's expectation copy
---
spec/features/adding_a_location_review_spec.rb | 4 ++--
spec/features/auto_generating_a_location_review_spec.rb | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/spec/features/adding_a_location_review_spec.rb b/spec/features/adding_a_location_review_spec.rb
index 0182984..e54fbd6 100644
--- a/spec/features/adding_a_location_review_spec.rb
+++ b/spec/features/adding_a_location_review_spec.rb
@@ -35,7 +35,7 @@
it "shows the 'Add review' form" do
expect(page).to have_content(
- "Review for #{location.name_utf8}, #{location.country.name}"
+ "Reviewing #{location.name_utf8}, #{location.country.name}"
)
expect(page).to have_button("Finish")
@@ -59,7 +59,7 @@
it "saves the review to the location" do
# Redirected successfully
expect(page).not_to have_content(
- "Review for #{location.name_utf8}, #{location.country.name}"
+ "Reviewing #{location.name_utf8}, #{location.country.name}"
)
expect(page).to have_content("Saved review")
diff --git a/spec/features/auto_generating_a_location_review_spec.rb b/spec/features/auto_generating_a_location_review_spec.rb
index 4c79b7b..1dddc14 100644
--- a/spec/features/auto_generating_a_location_review_spec.rb
+++ b/spec/features/auto_generating_a_location_review_spec.rb
@@ -38,7 +38,7 @@
it "shows the 'Add review' form with an 'Auto-generate review' button" do
expect(page).to have_content(
- "Review for #{location.name_utf8}, #{location.country.name}"
+ "Reviewing #{location.name_utf8}, #{location.country.name}"
)
expect(page).to have_content("Auto-generate review")