diff --git a/app/views/layouts/_head.html.slim b/app/views/layouts/_head.html.slim
new file mode 100644
index 00000000..a6fd56f1
--- /dev/null
+++ b/app/views/layouts/_head.html.slim
@@ -0,0 +1,24 @@
+title= [t('service.name'), yield(:page_title).presence].compact.join(' : ')
+
+= csrf_meta_tags
+= csp_meta_tag
+
+= tag.meta content: 'text/html; charset=UTF-8', 'http-equiv': 'Content-Type'
+= render 'layouts/analytics_header'
+= render 'layouts/hotjar'
+
+= tag.meta content: 'width=device-width,initial-scale=1', name: 'viewport'
+= tag.meta name: 'robots', content: 'noindex,nofollow' unless Rails.application.live?
+= tag.meta property: 'og:image', content: image_path('hfeyp_opengraph.png')
+= tag.meta name: 'description', content: @page&.meta_description if @page&.meta_description.present?
+
+= csrf_meta_tags
+= tag.meta name: 'theme-color', content: '#0b0c0c'
+
+= favicon_link_tag image_path('dfe_favicon.ico')
+
+= stylesheet_link_tag 'application', 'data-turbo-track': 'reload'
+
+= javascript_include_tag 'application', 'data-turbo-track': 'reload', defer: true
+
+= yield :head
\ No newline at end of file
diff --git a/app/views/layouts/application.html.slim b/app/views/layouts/application.html.slim
index cb50bbb1..4ec0530e 100644
--- a/app/views/layouts/application.html.slim
+++ b/app/views/layouts/application.html.slim
@@ -1,25 +1,7 @@
doctype html
html.govuk-template lang='en'
head
- title= [t('service.name'), yield(:page_title).presence].compact.join(' : ')
- = csrf_meta_tags
- = csp_meta_tag
-
- = tag.meta content: 'text/html; charset=UTF-8', 'http-equiv': 'Content-Type'
- = render 'layouts/analytics_header'
- = render 'layouts/hotjar'
-
- = tag.meta content: 'width=device-width,initial-scale=1', name: 'viewport'
- = tag.meta name: 'robots', content: 'noindex,nofollow' unless Rails.application.live?
- = tag.meta property: 'og:image', content: image_path('hfeyp_opengraph.png')
- = tag.meta name: 'description', content: @page&.meta_description if @page&.meta_description.present?
- = csrf_meta_tags
- = tag.meta name: 'theme-color', content: '#0b0c0c'
-
- = favicon_link_tag image_path('dfe_favicon.ico')
- = stylesheet_link_tag 'application', 'data-turbo-track': 'reload'
- = javascript_include_tag 'application', 'data-turbo-track': 'reload', defer: true
- = yield :head
+ = render 'layouts/head'
body#default-layout.govuk-template__body
script
diff --git a/app/views/layouts/hero.html.slim b/app/views/layouts/hero.html.slim
index 9aa5434b..5e5c5da8 100644
--- a/app/views/layouts/hero.html.slim
+++ b/app/views/layouts/hero.html.slim
@@ -1,25 +1,7 @@
doctype html
html.govuk-template lang='en'
head
- title= [t('service.name'), yield(:page_title).presence].compact.join(' : ')
- = csrf_meta_tags
- = csp_meta_tag
-
- = tag.meta content: 'text/html; charset=UTF-8', 'http-equiv': 'Content-Type'
- = render 'layouts/analytics_header'
- = render 'layouts/hotjar'
-
- = tag.meta content: 'width=device-width,initial-scale=1', name: 'viewport'
- = tag.meta name: 'robots', content: 'noindex,nofollow' unless Rails.application.live?
- = tag.meta property: 'og:image', content: image_path('hfeyp_opengraph.png')
- = tag.meta name: 'description', content: @page&.meta_description if @page&.meta_description.present?
- = csrf_meta_tags
- = tag.meta name: 'theme-color', content: '#0b0c0c'
-
- = favicon_link_tag image_path('dfe_favicon.ico')
- = stylesheet_link_tag 'application', 'data-turbo-track': 'reload'
- = javascript_include_tag 'application', 'data-turbo-track': 'reload', defer: true
- = yield :head
+ = render 'layouts/head'
body#hero-layout.govuk-template__body
script