egoist / docute

📚 Effortless documentation, done right.
https://docute.egoist.dev
MIT License
3.8k stars 427 forks source link

docs: fix navbar links document #221

Closed ittus closed 5 years ago

ittus commented 5 years ago

Problem

In document, it said that:

interface NavItem {
  title: string
  link?: string
  // Use `links` instead of `link` to display dropdown
  links?: Array<NavItemLink>
}

interface NavItemLink {
  title: string
  link: string
}

but in code, it used item.children instead of item.links

Solution

Change item.children to item.links

egoist commented 5 years ago

Let's use children instead

ittus commented 5 years ago

@egoist I fixed document instead.

Btw, in sidebar, we're using links instead of children

interface SidebarItem {
  title?: string
  links: Array<SidebarItemLink>
}

Should we change links to children for consistency?

egoist commented 5 years ago

Should we change links to children for consistency?

Yes, we can make it fallback to links for backward compatibility.

ittus commented 5 years ago

Sound nice! Should we do it in another pull request? In this pull request, I only fix document mistake only.

egoist commented 5 years ago

:tada: This PR is included in version 4.15.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket: