diff --git a/lib/govuk_tech_docs/meta_tags.rb b/lib/govuk_tech_docs/meta_tags.rb index 56ade52f..772da94c 100644 --- a/lib/govuk_tech_docs/meta_tags.rb +++ b/lib/govuk_tech_docs/meta_tags.rb @@ -48,7 +48,11 @@ def canonical_url attr_reader :config, :current_page def page_image - "#{host}/assets/govuk/assets/images/govuk-opengraph-image.png" + if config[:tech_docs][:show_govuk_logo] + "#{host}/assets/govuk/assets/images/govuk-opengraph-image.png" + else + "#{host}/assets/govuk/assets/images/default-opengraph-image.png" + end end def site_name diff --git a/lib/source/layouts/core.erb b/lib/source/layouts/core.erb index 14748662..3aa7a157 100644 --- a/lib/source/layouts/core.erb +++ b/lib/source/layouts/core.erb @@ -9,20 +9,24 @@ <%= stylesheet_link_tag :manifest %> - - - - - - + <% if config[:tech_docs][:show_govuk_logo] %> + + + + + + + + <% meta_tags.opengraph_tags.each do |property, content| %> + <%= tag :meta, property: property, content: content %> + <% end %> + <% end %> <% meta_tags.tags.each do |name, content| %> <%= tag :meta, name: name, content: content %> <% end %> - <% meta_tags.opengraph_tags.each do |property, content| %> - <%= tag :meta, property: property, content: content %> - <% end %> + <%= yield_content :head %>