From 82bdfe31ef9ef4853472264714a8f7bea62affeb Mon Sep 17 00:00:00 2001 From: Alex Colbeck <36191568+alexcolbeck1@users.noreply.github.com> Date: Wed, 19 Nov 2025 14:36:06 +0000 Subject: [PATCH 1/6] Fix site URL and baseurl for custom domain --- docs/_config.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/_config.yml b/docs/_config.yml index 21dc697..cfa474b 100644 --- a/docs/_config.yml +++ b/docs/_config.yml @@ -22,8 +22,8 @@ title: NHS Notify CMS # email: your-email@example.com description: >- # this means to ignore newlines until "baseurl:" NHS Notify Web CMS -baseurl: "/nhs-notify-web-cms" # the subpath of your site, e.g. /blog -url: "https://nhsdigital.github.io" # the base hostname & protocol for your site, e.g. http://example.com +baseurl: "" # the subpath of your site, e.g. /blog +url: "https://notify.nhs.uk" # the base hostname & protocol for your site, e.g. http://example.com collections_dir: collections From d4c1cdf45ca924600bddceb942963a241240c001 Mon Sep 17 00:00:00 2001 From: Alex Colbeck <36191568+alexcolbeck1@users.noreply.github.com> Date: Wed, 19 Nov 2025 15:32:46 +0000 Subject: [PATCH 2/6] Adding filter to remove URL redirect pages from appearing in the side nav --- docs/_layouts/page.html | 46 ++++++++++++++++++++++------------------- 1 file changed, 25 insertions(+), 21 deletions(-) diff --git a/docs/_layouts/page.html b/docs/_layouts/page.html index 3675251..569a764 100644 --- a/docs/_layouts/page.html +++ b/docs/_layouts/page.html @@ -25,11 +25,11 @@ {%- assign pages_with_sections = "" | split: "" -%} {%- for section in first_level -%} - {%- if section.name == "" or section.name == nil -%} - {%- assign pages_without_sections = pages_without_sections | concat: section.items -%} - {%- else -%} - {%- assign pages_with_sections = pages_with_sections | push: section -%} - {%- endif -%} +{%- if section.name == "" or section.name == nil -%} +{%- assign pages_without_sections = pages_without_sections | concat: section.items -%} +{%- else -%} +{%- assign pages_with_sections = pages_with_sections | push: section -%} +{%- endif -%} {%- endfor -%} {%- comment -%} @@ -41,28 +41,28 @@ {%- assign ordered_sections = "" | split: "" -%} {%- for section_name in section_order -%} - {%- for section in pages_with_sections -%} - {%- if section.name == section_name -%} - {%- assign ordered_sections = ordered_sections | push: section -%} - {%- break -%} - {%- endif -%} - {%- endfor -%} +{%- for section in pages_with_sections -%} +{%- if section.name == section_name -%} +{%- assign ordered_sections = ordered_sections | push: section -%} +{%- break -%} +{%- endif -%} +{%- endfor -%} {%- endfor -%} {%- comment -%} Add any sections not in the manual order list at the end {%- endcomment -%} {%- for section in pages_with_sections -%} - {%- assign found = false -%} - {%- for ordered_section in ordered_sections -%} - {%- if section.name == ordered_section.name -%} - {%- assign found = true -%} - {%- break -%} - {%- endif -%} - {%- endfor -%} - {%- unless found -%} - {%- assign ordered_sections = ordered_sections | push: section -%} - {%- endunless -%} +{%- assign found = false -%} +{%- for ordered_section in ordered_sections -%} +{%- if section.name == ordered_section.name -%} +{%- assign found = true -%} +{%- break -%} +{%- endif -%} +{%- endfor -%} +{%- unless found -%} +{%- assign ordered_sections = ordered_sections | push: section -%} +{%- endunless -%} {%- endfor -%}
@@ -79,6 +79,7 @@ {%- endcomment -%} {% for post in sorted_pages_without_sections %} {% unless post.has_children %} + {% if post.published != false and post.title != "" and post.title != nil %}
  • {{ post.title }}
  • + {% endif %} {% endunless %} {% endfor %} @@ -100,6 +102,7 @@ {% assign sorted = section.items | sort: 'nav_order' %} {% for post in sorted %} {% unless post.has_children %} + {% if post.published != false and post.title != "" and post.title != nil %}
  • {{ post.title }}
  • + {% endif %} {% endunless %} {% endfor %} {% endfor %} From 533882cde104e5caffda6b55ce7ee23463e7f6ed Mon Sep 17 00:00:00 2001 From: Alex Colbeck <36191568+alexcolbeck1@users.noreply.github.com> Date: Wed, 19 Nov 2025 15:54:09 +0000 Subject: [PATCH 3/6] Fixing CSP errors --- docs/_layouts/default.html | 7 +------ docs/assets/js/init.js | 6 ++++++ 2 files changed, 7 insertions(+), 6 deletions(-) create mode 100644 docs/assets/js/init.js diff --git a/docs/_layouts/default.html b/docs/_layouts/default.html index 78564cd..ab3c23c 100644 --- a/docs/_layouts/default.html +++ b/docs/_layouts/default.html @@ -24,8 +24,6 @@ - - Skip to main content {%- include header.html -%} @@ -34,10 +32,7 @@ {%- include footer.html -%} - + diff --git a/docs/assets/js/init.js b/docs/assets/js/init.js new file mode 100644 index 0000000..601a42b --- /dev/null +++ b/docs/assets/js/init.js @@ -0,0 +1,6 @@ +// Add classes to body for progressive enhancement +document.body.className += ' js-enabled' + ('noModule' in HTMLScriptElement.prototype ? ' nhsuk-frontend-supported' : ''); + +// Initialize NHS UK Frontend components +import { initAll } from './nhsuk-frontend.min.js'; +initAll(); From a22d205e240f15cecfd3c61473c0763b5081b50a Mon Sep 17 00:00:00 2001 From: Alex Colbeck <36191568+alexcolbeck1@users.noreply.github.com> Date: Wed, 19 Nov 2025 16:01:37 +0000 Subject: [PATCH 4/6] Commenting out unecessary JS --- docs/_includes/components/phase-banner.html | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/_includes/components/phase-banner.html b/docs/_includes/components/phase-banner.html index fed98d6..5e2662a 100644 --- a/docs/_includes/components/phase-banner.html +++ b/docs/_includes/components/phase-banner.html @@ -15,9 +15,11 @@
    + From 3e87cc8673cd87b9fc8eba2b90c05c2f33381cdc Mon Sep 17 00:00:00 2001 From: Alex Colbeck <36191568+alexcolbeck1@users.noreply.github.com> Date: Thu, 20 Nov 2025 08:49:42 +0000 Subject: [PATCH 5/6] Small CSS tweak to add padding to section headings in the side nav --- docs/assets/css/_nhsnotify-side-nav.scss | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/assets/css/_nhsnotify-side-nav.scss b/docs/assets/css/_nhsnotify-side-nav.scss index be60658..427ed6d 100644 --- a/docs/assets/css/_nhsnotify-side-nav.scss +++ b/docs/assets/css/_nhsnotify-side-nav.scss @@ -61,6 +61,10 @@ } } +.nhsnotify-side-nav__list-section:not(:first-of-type) { + margin-top: 24px; +} + .nhsnotify-side-nav__item { padding: 4px 0 0.5em; From 6f73886951b0ca57acaf0e29b0b130281d28ca00 Mon Sep 17 00:00:00 2001 From: Alex Colbeck <36191568+alexcolbeck1@users.noreply.github.com> Date: Thu, 20 Nov 2025 09:02:11 +0000 Subject: [PATCH 6/6] Implementing correct heading captions as per NHS design system --- docs/_layouts/page.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/_layouts/page.html b/docs/_layouts/page.html index 569a764..a5b297c 100644 --- a/docs/_layouts/page.html +++ b/docs/_layouts/page.html @@ -121,9 +121,9 @@
    {% if page.section != undefined %} - {{ page.section }} + {{ page.section }} {% endif %} -

    {{ page.title }}

    +

    {{ page.title }}

    {{ content }}