From 997f3daf85288b48a74de7b88de0c6f19fa75714 Mon Sep 17 00:00:00 2001 From: Duncan Brown Date: Thu, 26 May 2022 15:21:51 +0100 Subject: [PATCH] Correct asset path for middleman serve middleman build (ie prod builds) will override the default to respect the github pages path Crib from https://github.com/co-cddo/api-catalogue/pull/97 --- tech-docs/config.rb | 1 + tech-docs/source/stylesheets/screen.css.scss | 3 --- tech-docs/source/stylesheets/screen.css.scss.erb | 3 +++ 3 files changed, 4 insertions(+), 3 deletions(-) delete mode 100644 tech-docs/source/stylesheets/screen.css.scss create mode 100644 tech-docs/source/stylesheets/screen.css.scss.erb diff --git a/tech-docs/config.rb b/tech-docs/config.rb index 2d6cdbd..37f1f03 100644 --- a/tech-docs/config.rb +++ b/tech-docs/config.rb @@ -21,4 +21,5 @@ def list_items_from_headings(html, url: '', max_level: nil) configure :build do set :http_prefix, '/dfe-job-descriptions' + set :govuk_assets_path, '/dfe-job-descriptions/assets/govuk/assets/' end diff --git a/tech-docs/source/stylesheets/screen.css.scss b/tech-docs/source/stylesheets/screen.css.scss deleted file mode 100644 index 4341b1b..0000000 --- a/tech-docs/source/stylesheets/screen.css.scss +++ /dev/null @@ -1,3 +0,0 @@ -$govuk-assets-path: "/dfe-job-descriptions/assets/govuk/assets/"; - -@import "govuk_tech_docs"; diff --git a/tech-docs/source/stylesheets/screen.css.scss.erb b/tech-docs/source/stylesheets/screen.css.scss.erb new file mode 100644 index 0000000..01f3895 --- /dev/null +++ b/tech-docs/source/stylesheets/screen.css.scss.erb @@ -0,0 +1,3 @@ +$govuk-assets-path: "<%= app.config[:govuk_assets_path] || "/assets/govuk/assets/" %>"; + +@import "govuk_tech_docs";