module.exports = {
  title: "PHP程序员的FreeSWITCH开发文档",
  description: "一个PHP程序在做FreeSWITCH相关的应用开发时积累的技术文档",
  dest: "../dist",
  base: "/",
  plugins: ["@vuepress/back-to-top"],
  head: [
    // 百度统计代码
    [
      "script",
      {},
      `var _hmt = _hmt || [];
      (function() {
        var hm = document.createElement("script");
        hm.src = "https://hm.baidu.com/hm.js?1eb7f71a234c2320b396cbc51c1f047e";
        var s = document.getElementsByTagName("script")[0];
        s.parentNode.insertBefore(hm, s);
      })();`,
    ],
  ],
  themeConfig: {
    lastUpdated: "上次更新",
    displayAllHeaders: false,
    nav: [
      { text: '首页', link: '/' },
      { text: 'FreeSWITCH', link: '/freeswitch/' },
      { text: 'PHP', link: '/php/' }
    ],
    sidebar: {
      '/freeswitch/': [
        '../',
        '',
        {
          title: '安装',   // 必要的
          collapsable: true, // 可选的, 默认值是 true,
          sidebarDepth: 1,    // 可选的, 默认值是 1
          children: [
            '/freeswitch/debian11',
            '/freeswitch/debian-service',
            '/freeswitch/ubuntu1604'
          ]
        },
        {
          title: '安全',   // 必要的
          collapsable: true, // 可选的, 默认值是 true,
          sidebarDepth: 1,    // 可选的, 默认值是 1
          children: [
            '/freeswitch/fail2ban'
          ]
        }
      ],
      '/php/': [
        '../',
        '',
        'nginx',
        'openresty',
        'php82'
      ],
      '/': [
        '',
        {
          title: 'FreeSWITCH精选',   // 必要的
          collapsable: false, // 可选的, 默认值是 true,
          sidebarDepth: 1,    // 可选的, 默认值是 1
          children: [
            '/freeswitch/debian11',
            '/freeswitch/debian-service',
            '/freeswitch/ubuntu1604',
            '/freeswitch/fail2ban'
          ]
        },
        {
          title: 'PHP精选',   // 必要的
          collapsable: false, // 可选的, 默认值是 true,
          sidebarDepth: 1,    // 可选的, 默认值是 1
          children: [
            '/php/nginx',
            '/php/openresty',
            '/php/php82'
          ]
        },
      ]
    },
  },
};