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

Add openInNewTab option to nav and sidebar #236

Merged
merged 3 commits into from
Jun 9, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
update docs
  • Loading branch information
egoist committed Jun 9, 2019
commit 779ff05f9028cd6e372957948402f8f718a50089
9 changes: 9 additions & 0 deletions website/docs/options.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,18 @@ An array of navigation items to display at navbar.
interface NavItem {
title: string
link?: string
// Whether to open the link in a new tab
// Only works for external links
// Defaults to `true`
openInNewTab?: boolean
// Or use `children` to display dropdown menu
children?: Array<NavItemLink>
}

interface NavItemLink {
title: string
link: string
openInNewTab?: boolean
}
```

Expand All @@ -66,6 +71,10 @@ interface SidebarItem {
interface SidebarItemLink {
title: string
link: string
// Whether to open the link in a new tab
// Only works for external links
// Defaults to `true`
openInNewTab?: boolean
/* Whether to show TOC, true by default */
toc?: boolean
}
Expand Down
9 changes: 9 additions & 0 deletions website/docs/zh/options.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,18 @@ Customize the logo in header.
interface NavItem {
title: string
link?: string
// Whether to open the link in a new tab
// Only works for external links
// Defaults to `true`
openInNewTab?: boolean
// Use `children` instead of `link` to display dropdown
children?: Array<NavItemLink>
}

interface NavItemLink {
title: string
link: string
openInNewTab?: boolean
}
```

Expand All @@ -66,6 +71,10 @@ interface SidebarItem {
interface ItemLink {
title: string
link: string
// Whether to open the link in a new tab
// Only works for external links
// Defaults to `true`
openInNewTab?: boolean
/* 是否显示 TOC,默认为 true */
toc: boolean
}
Expand Down