feat: better favico, move some code to their own file, add repo link

Signed-off-by: Lucien Cartier-Tilet <lucien@phundrak.com>
This commit is contained in:
Lucien Cartier-Tilet 2023-02-01 02:41:44 +01:00
parent 95b1268e42
commit 68aabf77e0
Signed by: phundrak
GPG Key ID: BD7789E705CB8DCA
30 changed files with 220 additions and 137 deletions

View File

@ -1,155 +1,25 @@
import { defineUserConfig, defaultTheme } from 'vuepress'; import { defineUserConfig, defaultTheme } from 'vuepress';
import { removeHtmlExtensionPlugin } from 'vuepress-plugin-remove-html-extension'; import { removeHtmlExtensionPlugin } from 'vuepress-plugin-remove-html-extension';
import head from './head';
import locales from './locales';
import themeLocales from './themeLocales';
export default defineUserConfig({ export default defineUserConfig({
lang: 'fr-FR', lang: 'fr-FR',
title: 'Lucien Cartier-Tilet', title: 'Lucien Cartier-Tilet',
description: 'Site web personnel de Lucien Cartier-Tilet', description: 'Site web personnel de Lucien Cartier-Tilet',
lastUpdated: true, lastUpdated: true,
head: [ head: head,
[
'link',
{
rel: 'icon',
href: 'https://cdn.phundrak.com/img/mahakala-128x128.png',
},
],
[
'meta',
{
name: 'author',
content: 'Lucien Cartier-Tilet',
},
],
[
'meta',
{
property: 'og:image',
content: 'https://cdn.phundrak.com/img/rich_preview.png',
},
],
[
'meta',
{
property: 'org:title',
content: 'Lucien Cartier-Tilet',
},
],
[
'meta',
{
property: 'og:description',
content: 'Site web personnel de Lucien Cartier-Tilet',
},
],
[
'meta',
{
name: 'twitter:card',
content: 'summary',
},
],
[
'meta',
{
name: 'twitter:site',
content: '@phundrak',
},
],
[
'meta',
{
name: 'twitter:creator',
content: '@phundrak',
},
],
],
markdown: { markdown: {
html: true, html: true,
linkify: true, linkify: true,
typographer: true, typographer: true,
}, },
plugins: [removeHtmlExtensionPlugin()], plugins: [removeHtmlExtensionPlugin()],
locales: { locales: locales,
'/': {
lang: 'fr-FR',
title: 'Lucien Cartier-Tilet',
description: 'Site web personnel de Lucien Cartier-Tilet',
},
'/en/': {
lang: 'en-US',
title: 'Lucien Cartier-Tilet',
description: 'Personal website of Lucien Cartier-Tilet',
},
'/lfn/': {
lang: 'lfn',
title: 'Lucien Cartier-Tilet',
description: 'loca ueb de Lucien Cartier-Tilet',
},
},
theme: defaultTheme({ theme: defaultTheme({
contributors: false, contributors: false,
locales: { locales: themeLocales,
'/': { repo: 'https://labs.phundrak.com/phundrak/phundrak.com',
selectLanguageName: 'Français',
tip: 'nota bene',
warning: 'attention',
sidebar: [
'/README.md',
'/about.md',
'/resume.md',
'/projects.md',
'/conlanging.md',
'/vocal-synthesis.md',
],
notFound: [
'Cest bien vide ici',
'Pourquoi sommes-nous ici?',
'Erreur 404',
'Le lien ne semble pas être correct',
],
backToHome: 'Retour accueil',
openInNewWindow: 'Ouvrir dans une nouvelle fenêtre',
toggleColorMode: 'Changer de thème',
toggleSidebar: 'Barre latérale',
lastUpdatedText: 'Dernière mise à jour',
},
'/lfn/': {
selectLanguageName: 'Elefen',
tip: 'avisa',
warning: 'averti',
danger: 'peril',
sidebar: [
'/lfn/index.md',
'/lfn/about.md',
'/lfn/resume.md',
'/lfn/projects.md',
'/lfn/conlanging.md',
'/lfn/vocal-synthesis.md',
],
notFound: [
'Ce? Se no ave no cosa asi',
'A do vade tu?',
'Era 404',
'La lia no es coreta',
],
backToHome: 'reversa a la paja prima',
openInNewWindow: 'abri en un nova fenetra',
toggleColorMode: 'cambia la colores',
toggleSidebar: 'bara ladal',
lastUpdatedText: 'Ultima refresci',
},
'/en/': {
selectLanguageName: 'English',
sidebar: [
'/en/index.md',
'/en/about.md',
'/en/resume.md',
'/en/projects.md',
'/en/conlanging.md',
'/en/vocal-synthesis.md',
],
},
},
}), }),
}); });

128
.vuepress/head.ts Normal file
View File

@ -0,0 +1,128 @@
interface SimplifiedHeader {
tag: string;
content: [any];
}
const simplifiedHead = [
{
tag: 'meta',
content: [
{
name: 'author',
content: 'Lucien Cartier-Tilet',
},
{
property: 'og:image',
content: 'https://cdn.phundrak.com/img/rich_preview.png',
},
{
property: 'org:title',
content: 'Lucien Cartier-Tilet',
},
{
property: 'og:description',
content: 'Site web personnel de Lucien Cartier-Tilet',
},
{
name: 'twitter:card',
content: 'summary',
},
{
name: 'twitter:site',
content: '@phundrak',
},
{
name: 'twitter:creator',
content: '@phundrak',
},
{ name: 'msapplication-TileColor', content: '#3b4252' },
{ name: 'msapplication-TileImage', content: '/ms-icon-144x144.png' },
{ name: 'theme-color', content: '#3b4252' },
],
},
{
tag: 'link',
content: [
{
rel: 'apple-touch-icon',
sizes: '57x57',
href: '/apple-icon-57x57.png',
},
{
rel: 'apple-touch-icon',
sizes: '60x60',
href: '/apple-icon-60x60.png',
},
{
rel: 'apple-touch-icon',
sizes: '72x72',
href: '/apple-icon-72x72.png',
},
{
rel: 'apple-touch-icon',
sizes: '76x76',
href: '/apple-icon-76x76.png',
},
{
rel: 'apple-touch-icon',
sizes: '114x114',
href: '/apple-icon-114x114.png',
},
{
rel: 'apple-touch-icon',
sizes: '120x120',
href: '/apple-icon-120x120.png',
},
{
rel: 'apple-touch-icon',
sizes: '144x144',
href: '/apple-icon-144x144.png',
},
{
rel: 'apple-touch-icon',
sizes: '152x152',
href: '/apple-icon-152x152.png',
},
{
rel: 'apple-touch-icon',
sizes: '180x180',
href: '/apple-icon-180x180.png',
},
{
rel: 'icon',
type: 'image/png',
sizes: '192x192',
href: '/android-icon-192x192.png',
},
{
rel: 'icon',
type: 'image/png',
sizes: '32x32',
href: '/favicon-32x32.png',
},
{
rel: 'icon',
type: 'image/png',
sizes: '96x96',
href: '/favicon-96x96.png',
},
{
rel: 'icon',
type: 'image/png',
sizes: '16x16',
href: '/favicon-16x16.png',
},
{ rel: 'manifest', href: '/manifest.json' },
],
},
];
let head = [];
simplifiedHead.map((tag: SimplifiedHeader) => {
let tagName = tag.tag;
tag.content.forEach((element) => {
head.push([tagName, element]);
});
});
export default head;

19
.vuepress/locales.ts Normal file
View File

@ -0,0 +1,19 @@
const locales = {
'/': {
lang: 'fr-FR',
title: 'Lucien Cartier-Tilet',
description: 'Site web personnel de Lucien Cartier-Tilet',
},
'/en/': {
lang: 'en-US',
title: 'Lucien Cartier-Tilet',
description: 'Personal website of Lucien Cartier-Tilet',
},
'/lfn/': {
lang: 'lfn',
title: 'Lucien Cartier-Tilet',
description: 'loca ueb de Lucien Cartier-Tilet',
},
};
export default locales;

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 45 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

View File

@ -0,0 +1,2 @@
<?xml version="1.0" encoding="utf-8"?>
<browserconfig><msapplication><tile><square70x70logo src="/ms-icon-70x70.png"/><square150x150logo src="/ms-icon-150x150.png"/><square310x310logo src="/ms-icon-310x310.png"/><TileColor>#eceff4</TileColor></tile></msapplication></browserconfig>

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 94 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.4 KiB

64
.vuepress/themeLocales.ts Normal file
View File

@ -0,0 +1,64 @@
const themeLocales = {
'/': {
selectLanguageName: 'Français',
tip: 'nota bene',
warning: 'attention',
sidebar: [
'/README.md',
'/about.md',
'/resume.md',
'/projects.md',
'/conlanging.md',
'/vocal-synthesis.md',
],
notFound: [
'Cest bien vide ici',
'Pourquoi sommes-nous ici?',
'Erreur 404',
'Le lien ne semble pas être correct',
],
backToHome: 'Retour accueil',
openInNewWindow: 'Ouvrir dans une nouvelle fenêtre',
toggleColorMode: 'Changer de thème',
toggleSidebar: 'Barre latérale',
lastUpdatedText: 'Dernière mise à jour',
},
'/lfn/': {
selectLanguageName: 'Elefen',
tip: 'avisa',
warning: 'averti',
danger: 'peril',
sidebar: [
'/lfn/index.md',
'/lfn/about.md',
'/lfn/resume.md',
'/lfn/projects.md',
'/lfn/conlanging.md',
'/lfn/vocal-synthesis.md',
],
notFound: [
'Ce? Se no ave no cosa asi',
'A do vade tu?',
'Era 404',
'La lia no es coreta',
],
backToHome: 'reversa a la paja prima',
openInNewWindow: 'abri en un nova fenetra',
toggleColorMode: 'cambia la colores',
toggleSidebar: 'bara ladal',
lastUpdatedText: 'Ultima refresci',
},
'/en/': {
selectLanguageName: 'English',
sidebar: [
'/en/index.md',
'/en/about.md',
'/en/resume.md',
'/en/projects.md',
'/en/conlanging.md',
'/en/vocal-synthesis.md',
],
},
};
export default themeLocales;