chore: update Vuepress, add search bar

This commit is contained in:
2024-01-27 16:15:57 +01:00
parent 1ff33bfd64
commit cf1147204c
7 changed files with 4780 additions and 2817 deletions

View File

@@ -1,9 +1,11 @@
import { HeadAttrsConfig } from 'vuepress';
interface SimplifiedHeader {
tag: string;
content: [any];
content: HeadAttrsConfig[];
}
const simplifiedHead = [
const simplifiedHead: SimplifiedHeader[] = [
{
tag: 'meta',
content: [
@@ -117,12 +119,16 @@ const simplifiedHead = [
},
];
let head = [];
let headBuilder = [];
simplifiedHead.forEach((tag) => {
tag.content.forEach((element: any) => {
head.push([tag.tag, element]);
headBuilder.push([tag.tag, element]);
});
});
head.push(['a', { rel: 'me', href: 'https://emacs.ch/@phundrak' }, 'Mastodon']);
headBuilder.push([
'a',
{ rel: 'me', href: 'https://emacs.ch/@phundrak' },
'Mastodon',
]);
export default head;
export const head = headBuilder;