Skip to content

Wikilinks and hierarchical project structure #1838

Answered by mbostock
Martien asked this question in Q&A
Discussion options

You must be logged in to vote

I’m not sure I understand the question. Just pick whichever one you prefer? You can’t have both a folder and a flat structure. But note that your sidebar hierarchy is orthogonal to where the pages live, so you can do something like this:

export default {
  pages: [
    {
      name: "Section 1",
      path: "/section1",
      pages: [
        {name: "Page 1", path: "/page1"},
        {name: "Page 2", path: "/page2"}
      ]
    },
    {
      name: "Section 2",
      open: false,
      pages: [
        {name: "Page 3", path: "/page3"},
        {name: "Page 4", path: "/page4"}
      ]
    }
  ]
};

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Martien
Comment options

Answer selected by Fil
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants