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

Redirect support for group index & navOrder to control left nav option #943

Merged
merged 4 commits into from
Jul 8, 2023

Conversation

joepavitt
Copy link
Contributor

Description

  • navOrder can now be set in the frontmatter for an .md file, and it will affect the order in which the page appears in the left-side navigation. The higher the number, the more priority it gets at being shown first.
  • Added redirect as a frontmatter property too. This meant that we could redirect to a given child when a group (.e.g "Device Agent" is clicked, rather than having to have multiple README.md files with just a table of content. In this case we can redirect to a Getting Started or Introduction child.

Related Issue(s)

Will be opening a FF PR shortly with the first batch of docs changes that utilise these and will backlink once I've got that opened.

Checklist

@netlify
Copy link

netlify bot commented Jul 7, 2023

Deploy Preview for flowforge-website ready!

Name Link
🔨 Latest commit ab3315a
🔍 Latest deploy log https://app.netlify.com/sites/flowforge-website/deploys/64a87c7480c9280008eab53f
😎 Deploy Preview https://deploy-preview-943--flowforge-website.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@joepavitt joepavitt requested a review from ZJvandeWeg July 7, 2023 20:47
@ZJvandeWeg
Copy link
Member

navOrder can now be set in the frontmatter for an .md file, and it will affect the order in which the page appears in the left-side navigation. The higher the number, the more priority it gets at being shown first.

I found this confusing when I read the code, when I type 1 as order, I'd expect it to go first?

.eleventy.js Outdated Show resolved Hide resolved
.eleventy.js Outdated Show resolved Hide resolved
@joepavitt
Copy link
Contributor Author

I found this confusing when I read the code, when I type 1 as order, I'd expect it to go first?

That's fair, in which case, in addition to your recommended changes, we'd also need to change the order: -1 for the "Other" group catch all that's added.

joepavitt and others added 3 commits July 7, 2023 21:56
Co-authored-by: Zeger-Jan van de Weg <ZJvandeWeg@users.noreply.github.com>
Co-authored-by: Zeger-Jan van de Weg <ZJvandeWeg@users.noreply.github.com>
@joepavitt joepavitt requested a review from ZJvandeWeg July 7, 2023 21:01
@ZJvandeWeg ZJvandeWeg merged commit da4a68d into main Jul 8, 2023
5 checks passed
@ZJvandeWeg ZJvandeWeg deleted the leftnav-options branch July 8, 2023 20:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants