import { hopeTheme } from "vuepress-theme-hope";
import navbar from "./navbar.js";
import sidebar from "./sidebar.js";

export default hopeTheme(
  {
    hostname: "https://agxcoy.shimakaze.org",

    author: {
      name: "SilverAg.L",
      url: "https://github.com/AgxCOy",
    },
    logo: "/assets/images/avatar.webp",

    // repo: "AgxCOy/blogs",  // now becomes private.

    docsDir: "docs",

    // 导航栏
    navbar,
    // 侧边栏
    sidebar,
    // 页脚
    footer: "喵？……嗯哼♡",
    displayFooter: true,

    // 博客相关
    blog: {
      description: "希望你我都能……“玩”得尽兴♡",
      // intro: "/intro.html",
      medias: {
        BiliBili: "https://space.bilibili.com/301413212",
        Email: "mailto:caclx@outlook.com",
        GitHub: "https://github.com/AgxCOy",
        Steam: "https://steamcommunity.com/id/silveraglin/",
      },
    },

    // 加密配置
    // encrypt: {
    //   config: {
    //     "/demo/encrypt.html": ["1234"],
    //   },
    // },

    markdown: {
      align: true,
      alert: true,
      attrs: true,
      codeTabs: true,
      component: true,
      demo: true,
      figure: true,
      footnote: true,
      imgLazyload: true,
      imgSize: true,
      include: true,
      mark: true,
      plantuml: true,
      spoiler: true,
      stylize: [
        {
          matcher: "Recommended",
          replacer: ({ tag }) => {
            if (tag === "em")
              return {
                tag: "Badge",
                attrs: { type: "tip" },
                content: "Recommended",
              };
          },
        },
      ],
      sub: true,
      sup: true,
      tabs: true,
      tasklist: true,
      vPre: true,
      mermaid: true,
      math: true,  // katex
    },

    // 多语言配置
    metaLocales: {
      editLink: "在 GitHub 上编辑此页",
    },

    // 如果想要实时查看任何改变，启用它。注: 这对更新性能有很大负面影响
    // hotReload: true,

    // 在这里配置主题提供的插件
    plugins: {
      blog: {
        excerptLength: 0,
      },

      icon: {
        assets: "fontawesome-with-brands"
      },

      docsearch: {
        apiKey: '665b95419abc56fb78211160bc331a81',
        appId: 'JDO4FJXBV7',
        indexName: 'agxcoy-shimakaze'
      },

      comment: {
        provider: "Giscus",
        repo: "AgxCOy/AgxCOy",
        repoId: "R_kgDOLMGphQ",
        category: "Comments",
        categoryId: "DIC_kwDOLMGphc4CradT",
      },

      components: {
        components: ["Badge", "VPCard"],
      },
    },
  },
  {
  "custom": true
  }
);
