diff --git a/src/website/src/pages/ec/getting-started/index.mdx b/src/website/src/pages/ec/getting-started/index.mdx index 955a20eca34..4c1cce55708 100644 --- a/src/website/src/pages/ec/getting-started/index.mdx +++ b/src/website/src/pages/ec/getting-started/index.mdx @@ -4,6 +4,7 @@ title: Getting started --- import { Link } from '@ecl/website-components'; +import { ECL_VERSION } from '../../../preval/getVersion'; The Europa Component Library is a design system defining the visual identity of the European Commission on the web. @@ -92,7 +93,14 @@ There are also other optional css files distributed that can be used, pikaday is ECL is also distributing its presets on a CDN, all the files distributed in the package mentioned before are also available there, this is the pattern to reach them: `https://cdn{1,2,3 or 4}.fpfis.tech.ec.europa.eu/ecl/{tag}/{system}/{path/to/the/asset}` -Ex: https://cdn1.fpfis.tech.ec.europa.eu/ecl/v3.9.1/ec/styles/optional/ecl-ec-default.css +Ex: + + + {`https://cdn1.fpfis.tech.ec.europa.eu/ecl/v${ECL_VERSION}/ec/styles/optional/ecl-ec-default.css`} + Download a `preset-ec` package from the release page to see all the files available so to know how to reach them in the CDN, the file system is the same. diff --git a/src/website/src/pages/eu/getting-started/index.mdx b/src/website/src/pages/eu/getting-started/index.mdx index 4ef650308f4..5605d6f4ce5 100644 --- a/src/website/src/pages/eu/getting-started/index.mdx +++ b/src/website/src/pages/eu/getting-started/index.mdx @@ -4,6 +4,7 @@ title: Getting started --- import { Link } from '@ecl/website-components'; +import { ECL_VERSION } from '../../../preval/getVersion'; The Europa Component Library is a design system for the European Commission and websites managed by the Commission. @@ -91,7 +92,14 @@ There are also other optional css files distributed that can be used, moment.js ECL is also distributing its presets on a CDN, all the files distributed in the package mentioned before are also available in the CDN, this is the pattern to reach them: `https://cdn{1,2,3 or 4}.fpfis.tech.ec.europa.eu/ecl/{tag}/{system}/{path/to/the/asset}` -Ex: https://cdn1.fpfis.tech.ec.europa.eu/ecl/v3.9.1/eu/styles/optional/ecl-eu-default.css +Ex: + + + {`https://cdn1.fpfis.tech.ec.europa.eu/ecl/v${ECL_VERSION}/eu/styles/optional/ecl-ec-default.css`} + Download a `preset-eu` package to see all the files available to know how to reach them in the CDN, the file system is the same. diff --git a/src/website/src/preval/getVersion.js b/src/website/src/preval/getVersion.js new file mode 100644 index 00000000000..a01a3c04eea --- /dev/null +++ b/src/website/src/preval/getVersion.js @@ -0,0 +1 @@ +export const { ECL_VERSION } = { ECL_VERSION: process.env.ECL_VERSION }; diff --git a/src/website/webpack.config.prod.js b/src/website/webpack.config.prod.js index db3a4067837..9136ca09f30 100644 --- a/src/website/webpack.config.prod.js +++ b/src/website/webpack.config.prod.js @@ -37,10 +37,7 @@ const environmentModulePath = require.resolve( process.env.BABEL_ENV = 'production'; process.env.NODE_ENV = 'production'; -let eclVersion = lernaJson.version; -if (process.env.PULL_REQUEST && process.env.GITHUB_EVENT_NUMBER) { - eclVersion += ` - PR ${process.env.GITHUB_EVENT_NUMBER}`; -} +const eclVersion = lernaJson.version; let sri = {}; if ('CI' in process.env && process.env.GITHUB_REF.includes('refs/tags/')) {