diff --git a/lib/govuk_tech_docs/meta_tags.rb b/lib/govuk_tech_docs/meta_tags.rb index 07ed21b0..25d69bd1 100644 --- a/lib/govuk_tech_docs/meta_tags.rb +++ b/lib/govuk_tech_docs/meta_tags.rb @@ -25,7 +25,7 @@ def tags end def browser_title - [page_title, site_name].select(&:present?).uniq.join(" | ") + [page_title, site_name].select(&:present?).uniq.join(" - ") end def canonical_url diff --git a/spec/features/integration_spec.rb b/spec/features/integration_spec.rb index 0c0e9596..878bf2ad 100644 --- a/spec/features/integration_spec.rb +++ b/spec/features/integration_spec.rb @@ -57,7 +57,7 @@ def then_there_is_a_sidebar end def and_there_are_proper_meta_tags - expect(page).to have_title "GOV.UK Documentation Example | My First Service" + expect(page).to have_title "GOV.UK Documentation Example - My First Service" expect(page).to have_css 'meta[property="og:site_name"]', visible: false end diff --git a/spec/govuk_tech_docs/meta_tags_spec.rb b/spec/govuk_tech_docs/meta_tags_spec.rb index c7531969..b8463d86 100644 --- a/spec/govuk_tech_docs/meta_tags_spec.rb +++ b/spec/govuk_tech_docs/meta_tags_spec.rb @@ -3,7 +3,7 @@ it "combines the page title and service name" do browser_title = generate_title(site_name: "Test Site", page_title: "The Title") - expect(browser_title).to eql("The Title | Test Site") + expect(browser_title).to eql("The Title - Test Site") end it "does not duplicate the page title" do @@ -56,7 +56,7 @@ def generate_title(site_name:, page_title:) "twitter:card" => "summary", "twitter:domain" => "www.example.org", "twitter:image" => "https://www.example.org/images/govuk-large.png", - "twitter:title" => "The Title | Test Site", + "twitter:title" => "The Title - Test Site", "twitter:url" => "https://www.example.org/foo.html") end