Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spike technical approach for hosting v4 in a subfolder #346

Closed
2 tasks
Tracked by #2186
romaricpascal opened this issue Aug 25, 2023 · 3 comments · Fixed by #384
Closed
2 tasks
Tracked by #2186

Spike technical approach for hosting v4 in a subfolder #346

romaricpascal opened this issue Aug 25, 2023 · 3 comments · Fixed by #384
Assignees
Milestone

Comments

@romaricpascal
Copy link
Member

What

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

  • links (eg. moving to relative links, it might be worth thinking at some linting there as well)
  • making the frontend-docs menu work with two sets of documentation (we may want to look into what publishing docs are doing)
  • having a way to navigate between v4 and v5 docs (similarly, looking at publishing docs may be a good start, but we may want to anticipate how to look at more than 2 versions for future upates when we expand our public API, for ex).

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

  • We've listed the constraints hosting v4 in a subfolder raises
  • We have a plan to work with each of these constraints
@romaricpascal romaricpascal added documentation Improvements or additions to documentation ruby Pull requests that update Ruby code labels Aug 25, 2023
@romaricpascal romaricpascal added this to the v5.0 milestone Aug 25, 2023
@romaricpascal romaricpascal removed documentation Improvements or additions to documentation ruby Pull requests that update Ruby code labels Aug 25, 2023
@36degrees
Copy link
Contributor

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:

  • When building the table of contents for the v4 section, v4/index.html is seen as a parent of all the other files, which means the nav is generated very differently for the 2 sections
  • The v4 docs are also included at the very bottom of the v5 sidebar
  • The v5.x link in the header isn’t highlighted when on subpages for v5

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
Copy link
Member Author

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

@romaricpascal romaricpascal linked a pull request Nov 23, 2023 that will close this issue
@romaricpascal
Copy link
Member Author

Implemented in #384 🥳

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging a pull request may close this issue.

3 participants