diff --git a/.github/workflows/lighthouse-ci.yml b/.github/workflows/lighthouse-ci.yml index c2a4481ba5..9fd17a1ba8 100644 --- a/.github/workflows/lighthouse-ci.yml +++ b/.github/workflows/lighthouse-ci.yml @@ -12,13 +12,10 @@ jobs: - uses: actions/checkout@v3 with: ref: ${{ github.event.pull_request.head.sha }} - - name: Read .nvmrc file - id: read-nvmrc-file - run: echo "nvmrc=$(cat .nvmrc)" >> $GITHUB_OUTPUT - name: Install Node uses: actions/setup-node@v3 with: - node-version: "${{ steps.read-nvmrc-file.outputs.nvmrc }}" + node-version-file: ".nvmrc" - name: Install dependencies run: yarn install - name: Build pages diff --git a/.github/workflows/macro-and-script-tests.yml b/.github/workflows/macro-and-script-tests.yml index 5f20c4c1fb..0220d89974 100644 --- a/.github/workflows/macro-and-script-tests.yml +++ b/.github/workflows/macro-and-script-tests.yml @@ -12,13 +12,10 @@ jobs: steps: - name: Checkout uses: actions/checkout@v3 - - name: Read .nvmrc file - id: read-nvmrc-file - run: echo "nvmrc=$(cat .nvmrc)" >> $GITHUB_OUTPUT - name: Install Node uses: actions/setup-node@v3 with: - node-version: "${{ steps.read-nvmrc-file.outputs.nvmrc }}" + node-version-file: ".nvmrc" - name: Install dependencies run: yarn install - name: Run macro and script tests diff --git a/.github/workflows/npm-bundle.yml b/.github/workflows/npm-bundle.yml index 2dc0b4faa7..12631cbc70 100644 --- a/.github/workflows/npm-bundle.yml +++ b/.github/workflows/npm-bundle.yml @@ -10,9 +10,6 @@ jobs: build: runs-on: ubuntu-latest steps: - - name: Read .nvmrc file - id: read-nvmrc-file - run: echo "nvmrc=$(cat .nvmrc)" >> $GITHUB_OUTPUT - name: Use Node.js uses: actions/checkout@v3 with: @@ -20,7 +17,7 @@ jobs: - name: Install Node uses: actions/setup-node@v3 with: - node-version: "${{ steps.read-nvmrc-file.outputs.nvmrc }}" + node-version-file: ".nvmrc" registry-url: https://registry.npmjs.org/ - run: yarn install - run: git config --global user.name "${{ github.actor }}" diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 8a50c3eb18..c8db6937f5 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -8,13 +8,10 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - - name: Read .nvmrc file - id: read-nvmrc-file - run: echo "nvmrc=$(cat .nvmrc)" >> $GITHUB_OUTPUT - name: Install Node uses: actions/setup-node@v3 with: - node-version: "${{ steps.read-nvmrc-file.outputs.nvmrc }}" + node-version-file: ".nvmrc" - name: Install dependencies run: yarn install - name: Build templates diff --git a/.github/workflows/visual-regression-tests.yml b/.github/workflows/visual-regression-tests.yml index be5864b1e7..3d2cf558cb 100644 --- a/.github/workflows/visual-regression-tests.yml +++ b/.github/workflows/visual-regression-tests.yml @@ -15,13 +15,10 @@ jobs: with: lfs: true url: https://github.com/ONSdigital/design-system.git - - name: Read .nvmrc file - id: read-nvmrc-file - run: echo "nvmrc=$(cat .nvmrc)" >> $GITHUB_OUTPUT - name: Install Node uses: actions/setup-node@v3 with: - node-version: "${{ steps.read-nvmrc-file.outputs.nvmrc }}" + node-version-file: ".nvmrc" - name: Install dependencies run: yarn install - name: Install Docker diff --git a/src/layout/_template.njk b/src/layout/_template.njk index b5ca6fda6b..7e429f7292 100644 --- a/src/layout/_template.njk +++ b/src/layout/_template.njk @@ -138,29 +138,29 @@ {% endblock %} {% block header %} {{ - onsHeader({ - "wide": pageConfig.wide, - "fullWidth": pageConfig.fullWidth, - "language": pageConfig.header.language, - "button": pageConfig.header.signoutButton, - "toggleNavigationButton": pageConfig.header.toggleNavigationButton, - "navigation": pageConfig.header.navigation, - "siteSearchAutosuggest": pageConfig.header.siteSearchAutosuggest, - "browserBanner": pageConfig.header.browserBanner, - "phase": pageConfig.header.phase, - "assetsURL": assetsURL, - "serviceLinks": pageConfig.header.serviceLinks, - "variants": pageConfig.header.variants, - "classes": pageConfig.header.classes, - "mastheadLogo": pageConfig.header.mastheadLogo, - "mastheadLogoUrl": pageConfig.header.mastheadLogoUrl, - "titleUrl": pageConfig.header.titleUrl, - "title": pageConfig.header.title | default(pageConfig.title), - "description": pageConfig.header.description, - "titleAsH1": pageConfig.header.titleAsH1, - "titleLogo": pageConfig.header.titleLogo - }) - }} + onsHeader({ + "wide": pageConfig.wide, + "fullWidth": pageConfig.fullWidth, + "language": pageConfig.header.language, + "button": pageConfig.header.signoutButton, + "toggleNavigationButton": pageConfig.header.toggleNavigationButton, + "navigation": pageConfig.header.navigation, + "siteSearchAutosuggest": pageConfig.header.siteSearchAutosuggest, + "browserBanner": pageConfig.header.browserBanner, + "phase": pageConfig.header.phase, + "assetsURL": assetsURL, + "serviceLinks": pageConfig.header.serviceLinks, + "variants": pageConfig.header.variants, + "classes": pageConfig.header.classes, + "mastheadLogo": pageConfig.header.mastheadLogo, + "mastheadLogoUrl": pageConfig.header.mastheadLogoUrl, + "titleUrl": pageConfig.header.titleUrl, + "title": pageConfig.header.title | default(pageConfig.title), + "description": pageConfig.header.description, + "titleAsH1": pageConfig.header.titleAsH1, + "titleLogo": pageConfig.header.titleLogo + }) + }} {% endblock %} {% block pageContent %}
@@ -168,12 +168,12 @@ {% if pageConfig.breadcrumbs %} {% from "components/breadcrumbs/_macro.njk" import onsBreadcrumbs %} {{ - onsBreadcrumbs({ - "id": pageConfig.breadcrumbs.id, - "ariaLabel": pageConfig.breadcrumbs.ariaLabel, - "itemsList": pageConfig.breadcrumbs.itemsList - }) - }} + onsBreadcrumbs({ + "id": pageConfig.breadcrumbs.id, + "ariaLabel": pageConfig.breadcrumbs.ariaLabel, + "itemsList": pageConfig.breadcrumbs.itemsList + }) + }} {% endif %} {% endblock %}