2023-11-12 16:42:57 +00:00
|
|
|
|
import { defineConfig } from "vitepress";
|
|
|
|
|
import UnoCSS from "unocss/vite";
|
|
|
|
|
import { presetUno, presetAttributify, presetIcons } from "unocss";
|
2023-12-31 11:15:48 +00:00
|
|
|
|
import consola from "consola";
|
2023-12-28 10:48:39 +00:00
|
|
|
|
import { commitRef, feedback, meta, socials } from "./constants";
|
2023-12-31 11:15:48 +00:00
|
|
|
|
import { generateImages, generateMeta, generateFeed } from "./hooks";
|
2023-11-12 16:42:57 +00:00
|
|
|
|
import { toggleStarredPlugin } from "./markdown/toggleStarred";
|
|
|
|
|
import { base64DecodePlugin } from "./markdown/base64";
|
|
|
|
|
|
2023-11-13 01:54:44 +00:00
|
|
|
|
export default defineConfig({
|
|
|
|
|
title: "FMHY",
|
|
|
|
|
description: meta.description,
|
|
|
|
|
titleTemplate: ":title • freemediaheckyeah",
|
|
|
|
|
lang: "en-US",
|
|
|
|
|
lastUpdated: true,
|
|
|
|
|
cleanUrls: true,
|
|
|
|
|
appearance: "dark",
|
|
|
|
|
srcExclude: ["readme.md", "single-page"],
|
|
|
|
|
ignoreDeadLinks: true,
|
|
|
|
|
metaChunk: true,
|
|
|
|
|
sitemap: {
|
|
|
|
|
hostname: meta.hostname,
|
|
|
|
|
},
|
|
|
|
|
head: [
|
|
|
|
|
["meta", { name: "theme-color", content: "#7bc5e4" }],
|
|
|
|
|
["meta", { name: "og:type", content: "website" }],
|
|
|
|
|
["meta", { name: "og:locale", content: "en" }],
|
|
|
|
|
["link", { rel: "icon", href: "/test.png" }],
|
|
|
|
|
// PWA
|
|
|
|
|
["link", { rel: "icon", href: "/test.png", type: "image/svg+xml" }],
|
|
|
|
|
["link", { rel: "alternate icon", href: "/test.png" }],
|
|
|
|
|
["link", { rel: "mask-icon", href: "/test.png", color: "#7bc5e4" }],
|
|
|
|
|
// prettier-ignore
|
|
|
|
|
["meta", { name: "keywords", content: meta.keywords.join(" ") }],
|
|
|
|
|
["link", { rel: "apple-touch-icon", href: "/test.png", sizes: "192x192" }],
|
|
|
|
|
],
|
|
|
|
|
transformHead: async (context) => generateMeta(context, meta.hostname),
|
|
|
|
|
buildEnd: async (context) => {
|
2023-12-31 11:15:48 +00:00
|
|
|
|
generateImages(context)
|
|
|
|
|
.then(() => generateFeed(context))
|
|
|
|
|
.finally(() => consola.success("Success!"));
|
2023-11-13 01:54:44 +00:00
|
|
|
|
},
|
|
|
|
|
vite: {
|
|
|
|
|
plugins: [
|
|
|
|
|
UnoCSS({
|
2023-11-14 15:10:49 +00:00
|
|
|
|
theme: {
|
|
|
|
|
colors: {
|
|
|
|
|
primary: "var(--vp-c-brand-1)",
|
|
|
|
|
bg: "var(--vp-c-bg)",
|
|
|
|
|
"bg-alt": "var(--vp-c-bg-alt)",
|
|
|
|
|
"bg-elv": "var(--vp-c-bg-elv)",
|
|
|
|
|
text: "var(--vp-c-text-1)",
|
|
|
|
|
"text-2": "var(--vp-c-text-2)",
|
|
|
|
|
div: "var(--vp-c-divider)",
|
|
|
|
|
},
|
|
|
|
|
},
|
2023-11-13 01:54:44 +00:00
|
|
|
|
presets: [
|
|
|
|
|
presetUno(),
|
|
|
|
|
presetAttributify(),
|
|
|
|
|
presetIcons({
|
|
|
|
|
scale: 1.2,
|
|
|
|
|
extraProperties: {
|
|
|
|
|
display: "inline-block",
|
|
|
|
|
"vertical-align": "middle",
|
|
|
|
|
},
|
|
|
|
|
}),
|
|
|
|
|
],
|
|
|
|
|
}),
|
2023-11-12 16:42:57 +00:00
|
|
|
|
],
|
2023-11-13 01:54:44 +00:00
|
|
|
|
build: {
|
|
|
|
|
// Shut the fuck up
|
2023-11-14 15:10:49 +00:00
|
|
|
|
chunkSizeWarningLimit: Number.POSITIVE_INFINITY,
|
2023-11-12 16:42:57 +00:00
|
|
|
|
},
|
2023-11-13 01:54:44 +00:00
|
|
|
|
},
|
|
|
|
|
markdown: {
|
|
|
|
|
config(md) {
|
|
|
|
|
md.use(toggleStarredPlugin);
|
|
|
|
|
md.use(base64DecodePlugin);
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
themeConfig: {
|
|
|
|
|
search: {
|
|
|
|
|
options: {
|
2023-12-21 14:15:21 +00:00
|
|
|
|
miniSearch: {
|
|
|
|
|
searchOptions: {
|
|
|
|
|
combineWith: "AND",
|
|
|
|
|
fuzzy: false,
|
|
|
|
|
// @ts-ignore
|
|
|
|
|
boostDocument: (_, term, storedFields: Record<string, string | string[]>) => {
|
|
|
|
|
const titles = (storedFields?.titles as string[])
|
2023-12-30 10:44:04 +00:00
|
|
|
|
.filter((t) => Boolean(t))
|
2023-12-21 14:15:21 +00:00
|
|
|
|
.map((t) => t.toLowerCase());
|
|
|
|
|
// Uprate if term appears in titles. Add bonus for higher levels (i.e. lower index)
|
|
|
|
|
const titleIndex =
|
|
|
|
|
titles.map((t, i) => (t?.includes(term) ? i : -1)).find((i) => i >= 0) ?? -1;
|
|
|
|
|
if (titleIndex >= 0) return 10000 - titleIndex;
|
|
|
|
|
|
|
|
|
|
return 1;
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
},
|
2023-11-13 01:54:44 +00:00
|
|
|
|
detailedView: true,
|
2023-11-12 16:42:57 +00:00
|
|
|
|
},
|
2023-11-13 01:54:44 +00:00
|
|
|
|
provider: "local",
|
2023-11-12 16:42:57 +00:00
|
|
|
|
},
|
2023-11-13 01:54:44 +00:00
|
|
|
|
footer: {
|
2023-12-28 10:48:39 +00:00
|
|
|
|
message: `${feedback} (rev: ${commitRef})`,
|
2023-11-13 01:54:44 +00:00
|
|
|
|
},
|
|
|
|
|
outline: "deep",
|
|
|
|
|
logo: "/fmhy.ico",
|
|
|
|
|
nav: [
|
|
|
|
|
{ text: "Beginners Guide", link: "/beginners-guide" },
|
|
|
|
|
{ text: "Glossary", link: "https://rentry.org/The-Piracy-Glossary" },
|
|
|
|
|
{ text: "Guides", link: "https://rentry.co/fmhy-guides" },
|
|
|
|
|
{ text: "Backups", link: "https://www.reddit.com/r/FREEMEDIAHECKYEAH/wiki/backups" },
|
|
|
|
|
],
|
|
|
|
|
sidebar: [
|
|
|
|
|
{ text: "📛 Adblocking / Privacy", link: "/adblockvpnguide" },
|
|
|
|
|
{ text: "🤖 Artificial Intelligence", link: "/ai" },
|
|
|
|
|
{ text: "📺 Movies / TV / Anime", link: "/videopiracyguide" },
|
|
|
|
|
{ text: "🎵 Music / Podcasts / Radio", link: "/audiopiracyguide" },
|
|
|
|
|
{ text: "🎮 Gaming / Emulation", link: "/gamingpiracyguide" },
|
|
|
|
|
{ text: "📗 Books / Comics / Manga", link: "/readingpiracyguide" },
|
|
|
|
|
{ text: "💾 Downloading", link: "/downloadpiracyguide" },
|
|
|
|
|
{ text: "🌀 Torrenting", link: "/torrentpiracyguide" },
|
|
|
|
|
{ text: "🧠 Educational", link: "/edupiracyguide" },
|
|
|
|
|
{ text: "📱 Android / iOS", link: "/android-iosguide" },
|
|
|
|
|
{ text: "🐧 Linux / MacOS", link: "/linuxguide" },
|
|
|
|
|
{ text: "🌍 Non-English", link: "/non-english" },
|
|
|
|
|
{ text: "📂 Miscellaneous", link: "/miscguide" },
|
2023-11-26 11:50:44 +00:00
|
|
|
|
{
|
|
|
|
|
text: "🔧 Tools",
|
2023-12-25 09:19:49 +00:00
|
|
|
|
collapsed: false,
|
2023-11-26 11:50:44 +00:00
|
|
|
|
items: [
|
|
|
|
|
{ text: "💻 System Tools", link: "/system-tools" },
|
|
|
|
|
{ text: "🗃️ File Tools", link: "/file-tools" },
|
|
|
|
|
{ text: "🔗 Internet Tools", link: "/internet-tools" },
|
2023-12-18 10:32:27 +00:00
|
|
|
|
{ text: "💬 Social Media Tools", link: "/social-media-tools" },
|
2023-11-26 11:50:44 +00:00
|
|
|
|
{ text: "📝 Text Tools", link: "/text-tools" },
|
|
|
|
|
{ text: "👾 Gaming Tools", link: "/gamingpiracyguide#gaming-tools" },
|
|
|
|
|
{ text: "📷 Image Tools", link: "/img-tools" },
|
|
|
|
|
{ text: "📼 Video Tools", link: "/video-tools" },
|
2023-12-30 10:44:04 +00:00
|
|
|
|
{ text: "🔊 Audio Tools", link: "/audiopiracyguide#audio-tools" },
|
2023-11-26 11:50:44 +00:00
|
|
|
|
{ text: "🍎 Educational Tools", link: "/edupiracyguide#educational-tools" },
|
2023-11-26 12:06:14 +00:00
|
|
|
|
{ text: "👨💻 Developer Tools", link: "/devtools" },
|
2023-11-26 11:50:44 +00:00
|
|
|
|
],
|
|
|
|
|
},
|
2023-12-23 02:55:18 +00:00
|
|
|
|
{
|
2023-12-25 09:19:49 +00:00
|
|
|
|
text: "➕️ More",
|
2023-12-25 09:27:54 +00:00
|
|
|
|
collapsed: true,
|
2023-12-23 02:55:18 +00:00
|
|
|
|
items: [
|
|
|
|
|
{ text: "🔞 NSFW", link: "/nsfwpiracy" },
|
|
|
|
|
{ text: "⚠️ Unsafe Sites", link: "/unsafesites" },
|
|
|
|
|
{ text: "🔑 Base64", link: "/base64" },
|
|
|
|
|
{ text: "📦 Storage", link: "/storage" },
|
|
|
|
|
],
|
|
|
|
|
},
|
2023-11-13 01:54:44 +00:00
|
|
|
|
],
|
2023-11-14 15:10:49 +00:00
|
|
|
|
socialLinks: socials,
|
2023-11-13 01:54:44 +00:00
|
|
|
|
},
|
|
|
|
|
});
|