From: Eduardo San Martin Morote Date: Wed, 1 Dec 2021 13:26:02 +0000 (+0100) Subject: docs: use ts config X-Git-Tag: v4.0.13~50 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=97925d96d5b1ee19d67a0a7f939b6b49e2efa9a3;p=thirdparty%2Fvuejs%2Frouter.git docs: use ts config --- diff --git a/docs/.vitepress/config.js b/docs/.vitepress/config.ts similarity index 95% rename from docs/.vitepress/config.js rename to docs/.vitepress/config.ts index 75d9fbb9..b7202246 100644 --- a/docs/.vitepress/config.js +++ b/docs/.vitepress/config.ts @@ -1,7 +1,6 @@ -/** @typedef {import('vitepress').UserConfig} UserConfig */ +import { defineConfig, UserConfig } from 'vitepress' -/** @type {UserConfig['head']} */ -const head = [['link', { rel: 'icon', href: `/logo.png` }]] +const head: UserConfig['head'] = [['link', { rel: 'icon', href: `/logo.png` }]] if (process.env.NODE_ENV === 'production') { head.push([ @@ -13,8 +12,7 @@ if (process.env.NODE_ENV === 'production') { ]) } -/** @type {UserConfig} */ -const config = { +const config = defineConfig({ lang: 'en-US', title: 'Vue Router', description: 'The official router for Vue.js.', @@ -50,10 +48,13 @@ const config = { algolia: { apiKey: '07ed552fc16926cc57c9eb0862c1a7f9', + // TODO: upgrade this once it works + // appId: 'BTNTW3I1XP', + // apiKey: '771d10c8c5cc48f7922f15048b4d931c', indexName: 'next_router_vuejs', - searchParams: { - facetFilters: ['tags:guide,api,migration'], - }, + // searchParameters: { + // facetFilters: ['tags:guide,api,migration'], + // }, }, locales: { @@ -319,6 +320,6 @@ const config = { }, }, }, -} +}) -module.exports = config +export default config