refactor: rework API loader and caching
This commit removes dependency on rxjs. It also implements better composables to handle data fetching from remote APIs and caching these values more transparently. This commit also switches from yarn to npm It also switches to the official Umami plugin
This commit is contained in:
@@ -2,13 +2,13 @@ import { defaultTheme } from '@vuepress/theme-default';
|
||||
import { viteBundler } from '@vuepress/bundler-vite';
|
||||
import { defineUserConfig } from 'vuepress';
|
||||
import { searchProPlugin } from 'vuepress-plugin-search-pro';
|
||||
import { umamiAnalyticsPlugin } from 'vuepress-plugin-umami-analytics';
|
||||
import { umamiAnalyticsPlugin } from '@vuepress/plugin-umami-analytics';
|
||||
|
||||
import { head } from './head';
|
||||
import { locales, searchLocales } from './locales';
|
||||
import { themeLocales } from './themeLocales';
|
||||
|
||||
let isProd = process.env.NODE_ENV === 'production';
|
||||
const isProd = process.env.NODE_ENV === 'production';
|
||||
|
||||
export default defineUserConfig({
|
||||
lang: 'fr-FR',
|
||||
@@ -29,8 +29,7 @@ export default defineUserConfig({
|
||||
isProd
|
||||
? umamiAnalyticsPlugin({
|
||||
id: '67166941-8c83-4a19-bc8c-139e44b7f7aa',
|
||||
src: 'https://umami.phundrak.com/script.js',
|
||||
doNotTrack: true,
|
||||
link: 'https://umami.phundrak.com/script.js',
|
||||
})
|
||||
: [],
|
||||
],
|
||||
@@ -39,5 +38,9 @@ export default defineUserConfig({
|
||||
contributors: false,
|
||||
locales: themeLocales,
|
||||
repo: 'https://labs.phundrak.com/phundrak/phundrak.com',
|
||||
themePlugins: {
|
||||
copyCode: false,
|
||||
prismjs: false,
|
||||
},
|
||||
}),
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user