1
0

chore: switch to umami, upgrade Vuepress, add search feature

This commit is contained in:
2024-01-27 13:52:45 +01:00
parent 749651e64a
commit 41626f818c
5 changed files with 2645 additions and 21 deletions

View File

@@ -1,5 +1,8 @@
import { defineUserConfig, defaultTheme } from 'vuepress';
import { removeHtmlExtensionPlugin } from 'vuepress-plugin-remove-html-extension';
import { defaultTheme } from '@vuepress/theme-default';
import { defineUserConfig } from 'vuepress';
import { viteBundler } from '@vuepress/bundler-vite';
import { searchProPlugin } from 'vuepress-plugin-search-pro';
import head from './head';
export default defineUserConfig({
@@ -15,7 +18,12 @@ export default defineUserConfig({
level: [1, 2, 3, 4, 5],
},
},
plugins: [removeHtmlExtensionPlugin()],
plugins: [
searchProPlugin({
indexContent: true,
}),
],
bundler: viteBundler({}),
theme: defaultTheme({
sidebarDepth: 5,
repo: 'https://labs.phundrak.com/phundrak/conlang.phundrak.com',

View File

@@ -3,16 +3,12 @@ interface SimplifiedHeader {
content: [any];
}
const matomoTrackingCode = `var _paq = window._paq = window._paq || [];
_paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']);
(function() {
var u="https://matomo.phundrak.com/";
_paq.push(['setTrackerUrl', u+'matomo.php']);
_paq.push(['setSiteId', '4']);
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
})();`;
const matomoTrackingCode = `<script async
src="https://umami.phundrak.com/script.js"
data-website-id="dda1ea7b-086e-49b0-9cab-517314212ac5"
data-do-not-track="true"
>
</script>`;
const simplifiedHead = [
{