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/2] 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/2] 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 -%}