alphagov / govuk-frontend-docs

Technical documentation for GOV.UK Frontend
https://frontend.design-system.service.gov.uk/
36 stars 11 forks source link

Spike technical approach for hosting v4 in a subfolder #346

Closed romaricpascal closed 12 months ago

romaricpascal commented 1 year ago

What

Explore the impacts of hosting v4 in a subfolder, especially:

Why

We need to validate the feasibility of our plan for hosting older version of frontend-docs in sub folders

Who needs to know about this

Developers

Done when

36degrees commented 1 year ago

I've had a go at spiking this to see what the problems are. It all feels a little bit hacky, but I've managed to get 90% of the way there pretty quickly:

The main 'unsolved' problems are:

I've found it useful to see how GOV.UK Publishing Developer Docs have done things (the most complex use of the tech-docs-gem I'm aware of). For example, they have a separate 'multipage layout' that got me 90% of the way there for rendering the v4 sidebar.

I think if we needed to we could consider just hard-coding the v4 nav and ignoring the missing highlight of 'v5.x' to get this out the door, but worth trying to tidy a few bits up.

The tech docs gem doesn't really have an owner but it'd be worth thinking about what it'd take to get this supported in a less hacky way.

I'm not sure if I'll get a chance to come back to this before I go on leave, so if anyone else wants to pick this up then please do.

romaricpascal commented 1 year ago

Open a clean PR based on the spike branch, we can iterate the search if necessary if feedback comes in.

romaricpascal commented 12 months ago

Implemented in https://github.com/alphagov/govuk-frontend-docs/pull/384 🥳