Skip to content

Commit

Permalink
Change CDN deployment destination (#321)
Browse files Browse the repository at this point in the history
* Change CDN deployment destination

* Change cdn path

* Update design system to be on Nested URL
  • Loading branch information
bameyrick authored Apr 25, 2019
1 parent 4824712 commit aded7f9
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion ci/concourse.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ jobs:
args:
- -exc
- |
aws s3 sync --acl public-read dist s3://((s3_bucket_name))/design-system/
aws s3 sync --acl public-read dist s3://((s3_bucket_name))/sdc/design-system/
on_failure:
put: slack-alert
Expand Down
16 changes: 8 additions & 8 deletions src/get-started/index.njk
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ The following files are deployed to the `CDN` which can be referenced in a servi

To reference the files in your service you would use the following `url` structures (the `[VERSION]` should be replaced with the required release version e.g. ![](https://img.shields.io/github/release/onsdigital/design-system.svg?style=flat-square)):

- `https://cdn.ons.gov.uk/design-system/[VERSION]/css/main.css`
- `https://cdn.ons.gov.uk/design-system/[VERSION]/js/main.js`
- `https://cdn.ons.gov.uk/sdc/design-system/[VERSION]/css/main.css`
- `https://cdn.ons.gov.uk/sdc/design-system/[VERSION]/js/main.js`

Each release deployed to the `CDN` is always available. This allows services to plan upgrades to new versions.

Expand All @@ -27,31 +27,31 @@ Favicons have been created for Safari, Chrome and Edge/Internet Explorer for des

<code class="patternlib-example__code patternlib-example__pre html hljs">
<span class="hljs-tag">
&lt;<span class="hljs-name">meta</span> <span class="hljs-attr">name</span>=<span class="hljs-string">"msapplication-config"</span> <span class="hljs-attr">content</span>=<span class="hljs-string">"https://cdn.ons.gov.uk/design-system/[VERSION]/favicons/browserconfig.json"</span>&gt;
&lt;<span class="hljs-name">meta</span> <span class="hljs-attr">name</span>=<span class="hljs-string">"msapplication-config"</span> <span class="hljs-attr">content</span>=<span class="hljs-string">"https://cdn.ons.gov.uk/sdc/design-system/[VERSION]/favicons/browserconfig.json"</span>&gt;
</span>
<br>
<span class="hljs-tag">
&lt;<span class="hljs-name">link</span> <span class="hljs-attr">rel</span>=<span class="hljs-string">"icon"</span> <span class="hljs-attr">type</span>=<span class="hljs-string">"image/x-icon"</span> <span class="hljs-attr">href</span>=<span class="hljs-string">"/favicons/favicon.ico"</span>&gt;
</span>
<br>
<span class="hljs-tag">
&lt;<span class="hljs-name">link</span> <span class="hljs-attr">rel</span>=<span class="hljs-string">"icon"</span> <span class="hljs-attr">type</span>=<span class="hljs-string">"image/png"</span> <span class="hljs-attr">href</span>=<span class="hljs-string">"https://cdn.ons.gov.uk/design-system/[VERSION]/favicons/favicon-32x32.png"</span> <span class="hljs-attr">sizes</span>=<span class="hljs-string">"32x32"</span>&gt;
&lt;<span class="hljs-name">link</span> <span class="hljs-attr">rel</span>=<span class="hljs-string">"icon"</span> <span class="hljs-attr">type</span>=<span class="hljs-string">"image/png"</span> <span class="hljs-attr">href</span>=<span class="hljs-string">"https://cdn.ons.gov.uk/sdc/design-system/[VERSION]/favicons/favicon-32x32.png"</span> <span class="hljs-attr">sizes</span>=<span class="hljs-string">"32x32"</span>&gt;
</span>
<br>
<span class="hljs-tag">
&lt;<span class="hljs-name">link</span> <span class="hljs-attr">rel</span>=<span class="hljs-string">"icon"</span> <span class="hljs-attr">type</span>=<span class="hljs-string">"image/png"</span> <span class="hljs-attr">href</span>=<span class="hljs-string">"https://cdn.ons.gov.uk/design-system/[VERSION]/favicons/favicon-16x16.png"</span> <span class="hljs-attr">sizes</span>=<span class="hljs-string">"16x16"</span>&gt;
&lt;<span class="hljs-name">link</span> <span class="hljs-attr">rel</span>=<span class="hljs-string">"icon"</span> <span class="hljs-attr">type</span>=<span class="hljs-string">"image/png"</span> <span class="hljs-attr">href</span>=<span class="hljs-string">"https://cdn.ons.gov.uk/sdc/design-system/[VERSION]/favicons/favicon-16x16.png"</span> <span class="hljs-attr">sizes</span>=<span class="hljs-string">"16x16"</span>&gt;
</span>
<br>
<span class="hljs-tag">
&lt;<span class="hljs-name">link</span> <span class="hljs-attr">rel</span>=<span class="hljs-string">"mask-icon"</span> <span class="hljs-attr">color</span>=<span class="hljs-string">"#5bbad5"</span> <span class="hljs-attr">href</span>=<span class="hljs-string">"https://cdn.ons.gov.uk/design-system/[VERSION]/favicons/safari-pinned-tab.svg"</span>&gt;
&lt;<span class="hljs-name">link</span> <span class="hljs-attr">rel</span>=<span class="hljs-string">"mask-icon"</span> <span class="hljs-attr">color</span>=<span class="hljs-string">"#5bbad5"</span> <span class="hljs-attr">href</span>=<span class="hljs-string">"https://cdn.ons.gov.uk/sdc/design-system/[VERSION]/favicons/safari-pinned-tab.svg"</span>&gt;
</span>
<br>
<span class="hljs-tag">
&lt;<span class="hljs-name">link</span> <span class="hljs-attr">rel</span>=<span class="hljs-string">"apple-touch-icon"</span> <span class="hljs-attr">type</span>=<span class="hljs-string">"image/png"</span> <span class="hljs-attr">href</span>=<span class="hljs-string">"https://cdn.ons.gov.uk/design-system/[VERSION]/favicons/apple-touch-icon.png"</span> <span class="hljs-attr">sizes</span>=<span class="hljs-string">"180x180"</span>&gt;
&lt;<span class="hljs-name">link</span> <span class="hljs-attr">rel</span>=<span class="hljs-string">"apple-touch-icon"</span> <span class="hljs-attr">type</span>=<span class="hljs-string">"image/png"</span> <span class="hljs-attr">href</span>=<span class="hljs-string">"https://cdn.ons.gov.uk/sdc/design-system/[VERSION]/favicons/apple-touch-icon.png"</span> <span class="hljs-attr">sizes</span>=<span class="hljs-string">"180x180"</span>&gt;
</span>
<br>
<span class="hljs-tag">
&lt;<span class="hljs-name">link</span> <span class="hljs-attr">rel</span>=<span class="hljs-string">"manifest"</span> <span class="hljs-attr">href</span>=<span class="hljs-string">"https://cdn.ons.gov.uk/design-system/[VERSION]/favicons/manifest.json"</span>&gt;
&lt;<span class="hljs-name">link</span> <span class="hljs-attr">rel</span>=<span class="hljs-string">"manifest"</span> <span class="hljs-attr">href</span>=<span class="hljs-string">"https://cdn.ons.gov.uk/sdc/design-system/[VERSION]/favicons/manifest.json"</span>&gt;
</span>
</code>

Expand Down
2 changes: 1 addition & 1 deletion src/styles/page-template/_template.njk
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

{% if page.cdn or release_version %}
{# Production #}
{% set assetsURL = "https://cdn.ons.gov.uk/design-system/" + (page.cdn or release_version) %}
{% set assetsURL = "https://cdn.ons.gov.uk/sdc/design-system/" + (page.cdn or release_version) %}
{% elif data and data.version %}
{# Prototype kits #}
{% set assetsURL = "/" + data.version %}
Expand Down

0 comments on commit aded7f9

Please sign in to comment.