-
Notifications
You must be signed in to change notification settings - Fork 59
Description
It would be helpful to be able to create "external" links to a different section of the site. For example, i have two top level categories and I want to put a document on category A that links to the document in category B. Currently if you create a item that is type link that links to a document on the same site the item will open with the same sidebar. I think the behaviour should be that if you create a link to a document/page/etc. within the same site it should do a "full" navigate so that the page opens to the category where the document (or custom page, etc) is set.
Minimal configuration below:
import type { ZudokuConfig } from "zudoku";
const config: ZudokuConfig = {
navigation: [
{
type: "category",
label: "Category A",
items: [
"foo", // This is a `type: doc`
],
},
{
type: "category",
label: "Category B",
items: [
{
type: "link",
label: "Foo",
to: "/foo",
},
],
},
],
};
export default config;I am not sure if this can work by default (it might break other uses of the link type). If not maybe this is a setting on the object external: true or something.
I think it might be good to put the external icon
on these type of links as well to show that the content is in another section.