Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
### Fixes

- [Update logo SVG in header](https://github.com/alphagov/tech-docs-gem/pull/418)
- [Update path to GOV.UK Frontend assets when using GOV.UK logo](https://github.com/alphagov/tech-docs-gem/pull/419)

## 5.0.0

Expand Down
2 changes: 1 addition & 1 deletion lib/govuk_tech_docs/meta_tags.rb
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def canonical_url

def page_image
if config[:tech_docs][:show_govuk_logo]
"#{host}/assets/govuk/assets/images/govuk-opengraph-image.png"
"#{host}/assets/govuk/assets/rebrand/images/govuk-opengraph-image.png"
else
"#{host}/images/opengraph-image.png"
end
Expand Down
10 changes: 5 additions & 5 deletions lib/source/layouts/core.erb
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@
'/'
end
%>
<link rel="icon" sizes="48x48" href="<%= path_prefix %>assets/govuk/assets/images/favicon.ico">
<link rel="icon" sizes="any" href="<%= path_prefix %>assets/govuk/assets/images/favicon.svg" type="image/svg+xml">
<link rel="mask-icon" href="<%= path_prefix %>assets/govuk/assets/images/govuk-icon-mask.svg" color="#0b0c0c">
<link rel="apple-touch-icon" href="<%= path_prefix %>assets/govuk/assets/images/govuk-icon-180.png">
<link rel="manifest" href="<%= path_prefix %>assets/govuk/assets/manifest.json">
<link rel="icon" sizes="48x48" href="<%= path_prefix %>assets/govuk/assets/rebrand/images/favicon.ico">
<link rel="icon" sizes="any" href="<%= path_prefix %>assets/govuk/assets/rebrand/images/favicon.svg" type="image/svg+xml">
<link rel="mask-icon" href="<%= path_prefix %>assets/govuk/assets/rebrand/images/govuk-icon-mask.svg" color="#0b0c0c">
<link rel="apple-touch-icon" href="<%= path_prefix %>assets/govuk/assets/rebrand/images/govuk-icon-180.png">
<link rel="manifest" href="<%= path_prefix %>assets/govuk/assets/rebrand/manifest.json">
<% else %>
<link rel="icon" sizes="48x48" href="/images/favicon.ico">
<link rel="icon" sizes="any" href="/images/favicon.svg" type="image/svg+xml">
Expand Down
11 changes: 11 additions & 0 deletions spec/features/integration_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -151,5 +151,16 @@ def then_the_brand_refresh_is_enabled
expect(page).to have_css ".govuk-logo-dot"
# Check for crown svg in footer
expect(page).to have_css ".govuk-footer__crown"
# Check for favicons and other meta tags
# <link rel="icon" sizes="48x48" href="<%= path_prefix %>assets/govuk/assets/rebrand/images/favicon.ico">
expect(page).to have_css 'link[rel="icon"][sizes="48x48"][href$="assets/govuk/assets/rebrand/images/favicon.ico"]', visible: false
# <link rel="icon" sizes="any" href="<%= path_prefix %>assets/govuk/assets/rebrand/images/favicon.svg" type="image/svg+xml">
expect(page).to have_css 'link[rel="icon"][sizes="any"][type="image/svg+xml"][href$="assets/govuk/assets/rebrand/images/favicon.svg"]', visible: false
# <link rel="mask-icon" href="<%= path_prefix %>assets/govuk/assets/rebrand/images/govuk-icon-mask.svg" color="#0b0c0c">
expect(page).to have_css 'link[rel="mask-icon"][href$="assets/govuk/assets/rebrand/images/govuk-icon-mask.svg"][color="#0b0c0c"]', visible: false
# <link rel="apple-touch-icon" href="<%= path_prefix %>assets/govuk/assets/rebrand/images/govuk-icon-180.png">
expect(page).to have_css 'link[rel="apple-touch-icon"][href$="assets/govuk/assets/rebrand/images/govuk-icon-180.png"]', visible: false
# <link rel="manifest" href="<%= path_prefix %>assets/govuk/assets/rebrand/manifest.json">
expect(page).to have_css 'link[rel="manifest"][href$="assets/govuk/assets/rebrand/manifest.json"]', visible: false
end
end
4 changes: 2 additions & 2 deletions spec/govuk_tech_docs/meta_tags_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def generate_title(site_name:, page_title:)
"description" => "The description.",
"twitter:card" => "summary",
"twitter:domain" => "www.example.org",
"twitter:image" => "https://www.example.org/assets/govuk/assets/images/govuk-opengraph-image.png",
"twitter:image" => "https://www.example.org/assets/govuk/assets/rebrand/images/govuk-opengraph-image.png",
"twitter:title" => "The Title - Test Site",
"twitter:url" => "https://www.example.org/foo.html",
)
Expand Down Expand Up @@ -166,7 +166,7 @@ def generate_title(site_name:, page_title:)

expect(og_tags).to eql(
"og:description" => "The description.",
"og:image" => "https://www.example.org/assets/govuk/assets/images/govuk-opengraph-image.png",
"og:image" => "https://www.example.org/assets/govuk/assets/rebrand/images/govuk-opengraph-image.png",
"og:site_name" => "Test Site",
"og:title" => "The Title",
"og:type" => "object",
Expand Down