import vueJsx from '@vitejs/plugin-vue-jsx' const fs = require("fs"); const path = require("path"); const filePath = path.resolve("./Garden/logseq/config.edn"); const data = fs.readFileSync(filePath).toString(); let favorites = []; for (const match of data.matchAll(/:favorites \["([^\]]+)"\]/g)) { favorites = match[1].split("\" \"").map(page => ({ text: page, link: `/garden/${page.toLowerCase().replaceAll(' ', '-')}` })); } export default { lang: "en-US", title: 'The Paper Pilot', description: 'The Paper Pilot\'s Digital Garden', appearance: false, vite: { ssr: { noExternal: [ '@nolebase/vitepress-plugin-highlight-targeted-heading' ] }, plugins: [vueJsx()] }, sitemap: { hostname: 'https://thepaperpilot.org' }, head: [ ['link', { rel: 'preconnect', href: 'https://fonts.googleapis.com' }], ['link', { rel: 'stylesheet', href: 'https://fonts.googleapis.com/css2?family=Itim&family=Roboto+Mono:ital,wght@0,400;0,600;1,400&display=block' }], ['link', { rel: "apple-touch-icon", sizes: "180x180", href: "/apple-touch-icon.png"}], ['link', { rel: "icon", type: "image/png", sizes: "32x32", href: "/favicon-32x32.png"}], ['link', { rel: "icon", type: "image/png", sizes: "16x16", href: "/favicon-16x16.png"}], ['link', { rel: "manifest", href: "/site.webmanifest"}], ['link', { rel: "mask-icon", href: "/safari-pinned-tab.svg", color: "#3a0839"}], ['link', { rel: "shortcut icon", href: "/favicon.ico"}], ['meta', { name: "msapplication-TileColor", content: "#00FFFF"}], ['meta', { name: "msapplication-config", content: "/browserconfig.xml"}], ['meta', { name: "theme-color", content: "#3B4252"}], ['link', { rel: 'alternate', type: "text/mf2+html", href: '/changelog' }], ['link', { rel: 'alternate', type: "application/rss+xml", title: 'Changelog', href: '/changelog/rss' }], ['link', { rel: 'alternate', type: "application/atom+xml", title: 'Changelog', href: '/changelog/atom' }], ['link', { rel: 'alternate', type: "application/json+xml", title: 'Changelog', href: '/changelog/json' }], ['link', { rel: 'me', href: 'mailto:thepaperpilot@incremental.social' }], ['link', { rel: 'me', href: 'https://incremental.social/u/thepaperpilot' }], ['link', { rel: 'me', href: 'https://matrix.to/#/@thepaperpilot:incremental.social' }], ['link', { rel: 'me', href: 'https://code.incremental.social/thepaperpilot' }], ['link', { rel: 'me', href: 'https://www.linkedin.com/in/anthony-lawn/' }], ['link', { rel: 'me', href: 'https://mastodon.gamedev.place/@thepaperpilot' }], ['link', { rel: 'me', href: 'https://beehaw.org/u/thepaperpilot' }], ['link', { rel: 'me', href: 'https://www.reddit.com/user/ThePaperPilot/' }], ['link', { rel: 'me', href: 'https://github.com/thepaperpilot' }], ['link', { rel: 'me', href: 'https://twitter.com/ThePaperPilot' }], ['script', { 'data-goatcounter': 'https://thepaperpilot.goatcounter.com/count', async: true, src: '//gc.zgo.at/count.js' }], ], async transformHead(context) { context.head.push(["meta", { name: "og:title", content: context.pageData.title }]); context.head.push(["meta", { name: "og:description", content: context.pageData.description }]); context.head.push(["meta", { name: "og:image", content: "https://www.thepaperpilot.org/paperpilot_thumb.png" }]); context.head.push(["meta", { name: "og:site_name", content: context.siteData.description }]); if (context.pageData.relativePath.startsWith("garden")) { context.head.push(["meta", { name: "og:type", content: "article" }]); context.head.push(["meta", { name: "article:author", content: "https://www.thepaperpilot.org/about" }]); const published = context.content.match(/