1
0
Fork 0

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

This commit is contained in:
Lucien Cartier-Tilet 2024-01-27 13:52:45 +01:00
parent 749651e64a
commit 41626f818c
Signed by: phundrak
GPG Key ID: BD7789E705CB8DCA
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 = [
{

View File

@ -52,16 +52,25 @@ possible to store Flash cookies or local shared objects.
This site does not use them at all.
** Is there any analytics on this website?
Yes, but heres the catch: I use a self-hosted [[https://umami.is/][umami]] instance to track
what happens on this website. This service uses no cookies, is fully
GDPR and CCPA compliant, and completely anonymises you. I just know
that someone went on such or such web page, but I have no way of
knowing that the same person went on this then that page. Your privacy
is completely respected.
If you still want to block tracking, you can add =umami.phundrak.com= to
the list of domains blocked by uBlock Origin (the only adblocker Ill
ever trust).
** Is there targeted advertisement on this website?
Theres no advertisement to begin with. If you see any, check your
computer and browser for virus, that is not normal.
** How often is this page updated?
It is updated from time to time to reflect any changes in how my
website behaves, or if I notice errors on this page (such as typos). I
might add some user tracking, however dont worry, Matomo (the service
I would use) would only track you on this website and this website
only. Matomo respects the privacy of a websites users.
website behaves, or if I notice errors on this page (such as typos).
You can see the last update of this page by looking at the last
modification of the file =about.org= on [[https://labs.phundrak.com/phundrak/conlang.phundrak.com/src/branch/main/docs][this page]].

2611
package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

View File

@ -14,9 +14,9 @@
"author": "Lucien Cartier-Tilet <lucien@phundrak.com>",
"license": "AGPL-3.0",
"devDependencies": {
"vuepress": "2.0.0-beta.63"
},
"dependencies": {
"vuepress-plugin-remove-html-extension": "^0.1.0"
"@vuepress/bundler-vite": "^2.0.0-rc.2",
"@vuepress/theme-default": "2.0.0-rc.2",
"vuepress": "2.0.0-rc.2",
"vuepress-plugin-search-pro": "^2.0.0-rc.15"
}
}