Gov.uk Wordpress Theme

Author
Discussion

S6PNJ

Original Poster:

5,352 posts

288 months

Tuesday 22nd October
quotequote all
The Gov are changing the way 'gov' websites are run and are starting to mandate a gov.uk address. This affect local Parish Council websites, one of which I have been administering for a local Parish, but under an org.uk domain. As part of the move to gov.uk domains, they are also mandating meeting WCAG2.2AA, so I need to change my Wordpress theme to one that is more compliant.

I've found a gov.uk theme but to my meagre knowledge, I'm not sure how to get it onto my site. I've asked my host and their reply has been:
host said:
Yes, you should be able to simply download the zip file of the theme via the releases page (https://github.com/dxw/govuk-theme/releases/), then upload that from the normal Themes page, and you can then make any changes needed in a child theme from there.
however, the downloaded zip, to me, doesn't seem to have the same / similar files that I'd expect in a theme. Also, the github readme file says:
readme file said:
Install the dependencies:
npm install
composer install

Compile the assets:
npm run build

Run the tests:
vendor/bin/kahlan spec

Run the linter:
vendor/bin/php-cs-fixer fix
All of which, I'm not sure how to do.

Also, the gov.uk theme applies v3 of GOV.UK Frontend - they are now at 5.7.1, so I'd also need to be able to apply this update. I can ftp into the webhost, but I don't believe I have any access to a CLI window or similar, so how do I run the commands?

Answers written so a 5yr old can understand them gratefully appreciated!

bangerhoarder

563 posts

75 months

Tuesday 22nd October
quotequote all
You don't need the source.

Go to:

https://github.com/dxw/govuk-theme

and you can download the whole theme using the green Code / Download ZIP button.

S6PNJ

Original Poster:

5,352 posts

288 months

Tuesday 22nd October
quotequote all
Cheers - maybe I should have just listened to my Host's help and done that. It seems to have worked - though I've only done a live preview so far.

Also asked was how do I update the theme to use the new version of the GOV.UK frontend? I have access to a Linux machine if needed.

The gov.uk theme applies v3 of GOV.UK Frontend - they are now at 5.7.1, so I'd also need to be able to apply this update, so how do I run the commands please?

bangerhoarder

563 posts

75 months

Tuesday 22nd October
quotequote all
You can do it with a Linux machine, compile it etc, or have a look at:

https://frontend.design-system.service.gov.uk/inst...

S6PNJ

Original Poster:

5,352 posts

288 months

Tuesday 22nd October
quotequote all
bangerhoarder said:
You can do it with a Linux machine, compile it etc, or have a look at:

https://frontend.design-system.service.gov.uk/inst...
Thanks again. I did start typing out another reply (hidden in spoiler below) but after having re-read the Gov pages and your comment a few more times, I think it is, as said, just a case of copy pasting the updated files into the correct locations (I can manage that tongue out I think...)


Answers so a 5 year old can understand please. I know some stuff but some other stuff is a bit bewildering to me.

I can see there commands that need to be run - I can type these into a Linux terminal window, no problems. But how do the commands know where to apply the 'functions'? If I download the zip and uncompress it, it will sit in a folder somewhere on my disk (somewhere within my Home directory woudl be where I put it), so do I need to CD to this Theme directory to run the commands? Once the commands have all been run, would I then take a copy of all of the files within the Theme directory and FTP these to my host?

Regarding using the precompiled files, this page https://github.com/dxw/govuk-theme/ says "Currently, the theme applies v3 of GOV.UK Frontend" but the latest version is 5.7.1, so I'd need to update it.