what I want

currently I have to manually add sidebar entries, sometimes I forget to and it's a pain in the but to find out why a page isn't showing up in the sidebar and it's because I didn't add it to the sidebar. it's this platforms equivalent of forgetting a semicolon.

what I have

graphql query

{
  allFile {
    edges {
      node {
  relativePath

        id
      }
    }
  }
  allDirectory {
    edges {
      node {
        id
        relativePath
      }
    }
  }

}

output

{
  "data": {
    "allFile": {
      "edges": [
        {
          "node": {
            "relativePath": "robots.txt",
            "id": "e0c848ad-50b0-5c7b-8431-d08c8ee9121c"
          }
        },
        {
          "node": {
            "relativePath": "logos/logo-1024.png",
            "id": "91a9cc56-bbb3-58b2-8b89-bd544d3b95fd"
          }
        },
        {
          "node": {
            "relativePath": "logos/logo-48.png",
            "id": "f04333d9-8c3d-5009-bb10-b488fc08fb68"
          }
        },
        {
          "node": {
            "relativePath": "child/leaf/index.md",
            "id": "be3bdba0-d285-59e7-8dd0-d039013e4f0a"
          }
        },
        {
          "node": {
            "relativePath": "index.md",
            "id": "dcb48887-12c1-5137-86dc-b7b4a735fad8"
          }
        }
      ]
    },
    "allDirectory": {
      "edges": [
        {
          "node": {
            "id": "3ab861a9-f5df-5642-9969-0c54d8fd9b32",
            "relativePath": ""
          }
        },
        {
          "node": {
            "id": "2a281c83-3057-5594-943b-12ecc0d9ce85",
            "relativePath": "logos"
          }
        },
        {
          "node": {
            "id": "d146f503-6c08-5bab-ba4b-1c2046a14130",
            "relativePath": ""
          }
        },
        {
          "node": {
            "id": "57a3d070-4135-5506-bbaf-deb816e8f953",
            "relativePath": "child"
          }
        },
        {
          "node": {
            "id": "6ac778de-28ce-5bb4-92f5-80e11b9df8d5",
            "relativePath": "child/leaf"
          }
        }
      ]
    }
  }
}

this query should be turned into

<ul>
  <li>robots.txt</li>
  <li>index.md</li>
  <ul>
      logos
      <li>log-1024.png</li>
      <li>log-48.png</li>
  </ul
  <ul>
      child
      <li>
          <ul>
              leaf
              <li>index.md</li>
          </ul>
      </li>
  </ul>
</ul

Note: logos will eventually be a directory seperate from content, as with all images, to prevent generating image locations in sidebar, although.. might be nice to have towards the bottom, that way I can just save image files to the images folder, and automatically have a cdn.