Repository navigation
GRO-740 Add category layout (to support eventual "Getting started" migration) - #1369
Conversation
|
The deployments were removed when this pull request closed. Reopening it deploys again at the same address. |
…se the degraded experience is moved to the edge case, not the default
90a4764 to
1d6e4a2
Compare
…ere's no need + type fix
bfe80c1 to
2ef90cb
Compare
tmashara
left a comment
There was a problem hiding this comment.
looks good!
left one non-blocking comment about fetching non-docs pages for the category page layout.
| .map(async (node) => { | ||
| const doc = await getEntry("docs", docIdFromUrl(node.url)); | ||
| if (!doc) { | ||
| throw new Error(`Doc not found: ${node.url}`); |
There was a problem hiding this comment.
some nav items have links pointing to non-docs pages, mb we should filter them out or add a fallback for such items?
There was a problem hiding this comment.
@jeff-bruemmer Do you know of any cases where we'd have one of these category landing pages with a card that's an external link? Or have an opinion on what should happen if that ever comes up?
I didn't want to just guess at the behavior so I just have it failing loudly if it ever happens. We could leave that as is and cross that bridge if we come to it. I'm also happy to implement some kind of a fallback.
There was a problem hiding this comment.
GH failed to post Jeff's comment, but I DM'd him. We'll just show cards for links to actual docs. I updated the code to filter out external links in 96220c2.
jeff-bruemmer
left a comment
There was a problem hiding this comment.
Left a comment re: category page cards.
GRO-740
Description
https://www.metabase.com/learn/metabase-basics/getting-started is moving to docs. This PR adds a category layout, which matches the styles of that landing page. Nothing in the metabase docs use this layout yet so this won't immediately ship the layout to production. The tech writers will move the pages themselves, they just need a way to have a nice landing page, which this provides.
How to test
gro-740-getting-started-landing-pagebranch. I just stubbed out the data there so the docs repo can auto-generate the cards. Don't take it as gospel, I'll probably delete the branch.Noteworthy changes
The breadcrumb logic (which was ported from jekyll) had a lot of cruft. It also enforced landing pages to live at
*/start, which I'm assuming we don't want for/metabase-basics/getting-started. I tried to simplify the logic and make category page urls get defined via nav.yml. This has a few upshots: