import { defineConfig } from 'vitepress'

export default defineConfig({
  title: 'Jiscuss - 简单,轻量基于 Java 的开源论坛(皆是卡斯)',
  description: 'Jiscuss，一个简单的、基于 Java 的开源论坛。',
  lang: 'zh-CN',
  lastUpdated: true,
  cleanUrls: true,
  outDir: '../public',
  head: [
    ['link', { rel: 'icon', href: '/favicon.ico' }],
    ['meta', { name: 'viewport', content: 'width=device-width,initial-scale=1,user-scalable=no' }]
  ],
  markdown: {
    lineNumbers: true
  },
  themeConfig: {
    logo: '/head.png',
    siteTitle: 'Jiscuss',
    nav: [
      { text: '首页', link: '/' },
      { text: '文档', link: '/views/other/guide' },
      { text: '时间线', link: '/timeLine/' },
      { text: 'Jiscuss Demo', link: 'http://demo.jiscuss.com' },
      {
        text: '联系作者',
        items: [
          { text: 'CYY.IM', link: 'http://www.cyy.im' },
          { text: 'GitHub', link: 'https://github.com/chuyaoyuan' },
          { text: 'WeChat', link: 'http://www.chuyaoyuan.com' }
        ]
      }
    ],
    sidebar: {
      '/views/': [
        {
          text: 'Jiscuss 文档',
          items: [
            { text: '快速上手', link: '/views/other/guide' }
          ]
        }
      ],
      '/timeLine/': [
        {
          text: '项目时间线',
          items: [
            { text: 'Time Line', link: '/timeLine/' }
          ]
        }
      ]
    },
    search: {
      provider: 'local'
    },
    outline: {
      label: '本页目录',
      level: [2, 3]
    },
    docFooter: {
      prev: '上一页',
      next: '下一页'
    },
    lastUpdated: {
      text: '最后更新',
      formatOptions: {
        dateStyle: 'short',
        timeStyle: 'medium'
      }
    },
    footer: {
      message: 'Released under the MIT License.',
      copyright: 'Copyright © 2019-present Yaoyuan | <a href="https://beian.miit.gov.cn/" target="_blank">辽ICP备15002723号-6</a>'
    },
    socialLinks: [
      { icon: 'github', link: 'https://github.com/chuyaoyuan' }
    ]
  }
})
