Closed geriom closed 1 year ago
I only see this on pipelines and triggers docs. What do we need to do to get it to show for the other projects?
I only see this on pipelines and triggers docs. What do we need to do to get it to show for the other projects?
It seems we are reaching some sort of limit on the number of nav items we can go through. The site gives up at CLI v0.10.0
after checking every single file under /Pipelines
and /Triggers
. I might be running into some sort of cache issue. I'll keep looking for an answer.
[APPROVALNOTIFIER] This PR is APPROVED
This pull-request has been approved by: afrittoli
The full list of commands accepted by this bot can be found here.
The pull request process is described here
I only see this on pipelines and triggers docs. What do we need to do to get it to show for the other projects?
Fixed. The problem was that the macro generating the tree is a recursive definition, and we have so many elements in the vault we had a Stack Overflow, which silently just skipped the rest of the items. I adjusted the tree root to each subfolder in the vault. Prevents the overflow, simplifies the code and it's way more efficient too.
I renamed the LTS folders to use a dash because docsy really doesn't like spaces in folder names.
@AlanGreene this is ready for review.
Unfortunately this seems to break the version dropdown. If I select a previous version the header still states 'Latest Versions' and there's no way to actually get back to the latest versions without navigating away and back into the docs root.
See the URL shows pipelines-v0.40.x and the correct nav + doc content, but the header and dropdown does not match and think they're showing latest.
Unfortunately this seems to break the version dropdown. If I select a previous version the header still states 'Latest Versions' and there's no way to actually get back to the latest versions without navigating away and back into the docs root.
@AlanGreene Thank you for the thorough testing. I missed the switcher partial, I just added it back. I'm going to summarize, for posterity, what I'm doing here:
When the site was created we had two layouts, one for docs/
and one for vault/
. These layouts were identical except for the nav tree and the version swticher. For every site update, both layouts had to be updated, which is easier said than done, and they started drifting apart; that's what broke the nav for vault/
. Currently we don't need separate layouts, docsy supports declaring the type of doc in a folder, using the cascading: -type
option, and the doc picks the layout that matches the type.
This PR deletes the redundant code (6 layout files), which will prevent drift and make it easier to maintain. Instead I'm using the default docs layout with flags that set the correct nav-tree and version-switcher menu depending on the current Path. The only significant difference is that the "Documentation" nav link on the top bar is always visible, which gives a quick way to go back to the main docs from the vault.
Let me know if you see anything else not working as expected.
Great work @geriom, thanks for tackling this. All looks good now, and it even gets rid of the unwanted Vault entry in the sidebar that I hadn't noticed before. It's also nice having less code to maintain and fewer manual steps required on future upgrades. 👍
/lgtm /meow
@AlanGreene:
Changes
This new layout is essentially the default docsy code with small changes to keep the menu scope in the correct subfolder.
/closes #465
Submitter Checklist
These are the criteria that every PR should meet, please check them off as you review them:
See the contribution guide for more details.