From 97925d96d5b1ee19d67a0a7f939b6b49e2efa9a3 Mon Sep 17 00:00:00 2001 From: Eduardo San Martin Morote Date: Wed, 1 Dec 2021 14:26:02 +0100 Subject: [PATCH] docs: use ts config --- docs/.vitepress/{config.js => config.ts} | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) rename docs/.vitepress/{config.js => config.ts} (95%) 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 -- 2.47.2