File size: 1,989 Bytes
cf86710
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
import type { SidebarsConfig } from "@docusaurus/plugin-content-docs";

import typedocSidebar from "./docs/api/typedoc-sidebar.cjs";

// Something doesn't work when using the TypeDoc sidebar with DateLib importing types from date-fns.
const typedocSidebarFixed = typedocSidebar.map((item) => {
  if (item.label === "Classes") {
    return {
      ...item,
      items: item.items?.map((item) => {
        if (item.label === "DateLib") {
          return {
            type: "doc",
            id: "api/classes/DateLib",
            label: "DateLib",
          };
        }
        return item;
      }),
    };
  }
  return item;
});

const sidebars: SidebarsConfig = {
  docs: [
    "intro",
    "start",
    {
      type: "category",
      label: "Customization",
      collapsed: false,
      items: [
        {
          type: "autogenerated",
          dirName: "docs",
        },
      ],
    },
    {
      type: "category",
      label: "Selecting Days",
      collapsed: false,
      items: [
        {
          type: "autogenerated",
          dirName: "selections",
        },
      ],
    },
    {
      type: "category",
      label: "Localization",
      collapsed: false,
      items: [
        "localization/changing-locale",
        "localization/setting-time-zone",
        "localization/iso-and-broadcast",
        "localization/persian",
        "localization/buddhist",
        "localization/ethiopic",
        "localization/hebrew",
      ],
    },
    {
      type: "category",
      label: "Guides",
      collapsed: false,
      items: [
        {
          type: "autogenerated",
          dirName: "guides",
        },
      ],
    },
    {
      type: "category",
      label: "Development",
      collapsed: true,
      items: [
        {
          type: "autogenerated",
          dirName: "development",
        },
      ],
    },
    "changelog",
    "upgrading",
    "license",
  ],
  api: ["api/index", typedocSidebarFixed],
};

export default sidebars;