axios-miniprogram/docs/.vitepress/config.ts

64 lines
2.2 KiB
TypeScript
Raw Normal View History

2023-03-24 22:35:58 +08:00
import { defineConfig } from 'vitepress';
// https://vitepress.dev/reference/site-config
export default defineConfig({
title: 'axios-miniprogram',
description: '基于 Promise 的 HTTP 请求库,适用于各大小程序平台。',
2023-04-11 16:10:23 +08:00
srcDir: 'pages',
2023-03-24 22:35:58 +08:00
themeConfig: {
// https://vitepress.dev/reference/default-theme-config
nav: [
2023-03-25 16:22:01 +08:00
{ text: '指南', link: '/guide/introduction' },
{ text: '配置', link: '/config/preview' },
{ text: 'API', link: '/api/interceptors' },
2023-03-24 22:35:58 +08:00
],
sidebar: [
{
2023-03-25 16:22:01 +08:00
text: '指南',
2023-03-24 22:35:58 +08:00
items: [
2023-03-25 16:22:01 +08:00
{ text: '简介', link: '/guide/introduction' },
{ text: '快速上手', link: '/guide/quick-start' },
],
},
{
text: '配置',
items: [
{ text: '默认配置', link: '/config/preview' },
{ text: 'method', link: '/config/method' },
{ text: 'dataType', link: '/config/data-type' },
{ text: 'responseType', link: '/config/response-type' },
{ text: 'validateStatus', link: '/config/validate-status' },
{ text: 'paramsSerializer', link: '/config/params-serializer' },
{ text: 'transformRequest', link: '/config/transform-request' },
{ text: 'transformResponse', link: '/config/transform-response' },
{ text: 'errorHandler', link: '/config/error-handler' },
2023-04-05 15:24:27 +08:00
{ text: 'upload', link: '/config/upload' },
{ text: 'download', link: '/config/download' },
2023-03-25 16:22:01 +08:00
{ text: 'adapter', link: '/config/adapter' },
],
},
{
text: 'API',
items: [
{ text: 'interceptors', link: '/api/interceptors' },
{ text: 'CancelToken', link: '/api/cancel-token' },
{ text: 'isCancel', link: '/api/is-cancel' },
2023-04-05 15:24:27 +08:00
{ text: 'isAxiosError', link: '/api/is-axios-error' },
2023-03-25 16:22:01 +08:00
{ text: 'getUri', link: '/api/get-uri' },
{ text: 'create', link: '/api/create' },
2023-04-11 16:26:13 +08:00
{ text: 'fork', link: '/api/fork' },
2023-03-25 16:22:01 +08:00
{ text: 'Axios', link: '/api/axios' },
2023-03-24 22:35:58 +08:00
],
},
],
socialLinks: [
{ icon: 'github', link: 'https://github.com/zjx0905/axios-miniprogram' },
],
2023-03-25 16:22:01 +08:00
returnToTopLabel: '返回顶部',
outlineTitle: '导航栏',
2023-03-24 22:35:58 +08:00
},
});