This commit is contained in:
taskylizard 2023-10-31 00:02:25 +05:30
parent fe7f5bb663
commit 3f1373eb7a
No known key found for this signature in database
GPG Key ID: 5CABA3D642DDC497
9 changed files with 2867 additions and 181 deletions

2
.github/script.sh vendored
View File

@ -2,4 +2,4 @@ for file in *; do
[[ -f "$file" ]] && mv "$file" "${file,,}" 2>/dev/null [[ -f "$file" ]] && mv "$file" "${file,,}" 2>/dev/null
done done
python .github/replace.py python .github/replace.py
python .github/add-headers.py # python .github/add-headers.py

View File

@ -1,85 +1,110 @@
import { defineConfig } from "vitepress"; import { defineConfig } from "vitepress";
import { withPwa } from "@vite-pwa/vitepress";
import UnoCSS from "unocss/vite"; import UnoCSS from "unocss/vite";
import { presetUno, presetAttributify, presetIcons } from "unocss"; import { presetUno, presetAttributify, presetIcons } from "unocss";
import { info } from "./constants";
import { pwa } from "./pwa";
export default defineConfig({ export default withPwa(
title: "FMHY", defineConfig({
description: title: "FMHY",
"The Largest Collection Of Free Stuff On The Internet!The Largest Collection Of Free Stuff On The Internet!", description: info.description,
titleTemplate: ":title | FreeMediaHeckYeah", titleTemplate: ":title | FreeMediaHeckYeah",
lang: "en-US", lang: "en-US",
lastUpdated: true, lastUpdated: true,
cleanUrls: true, cleanUrls: true,
appearance: "dark", appearance: "dark",
srcExclude: ["README.md", "single-page", "DEVTools.md"], srcExclude: ["README.md", "single-page", "DEVTools.md"],
ignoreDeadLinks: true, ignoreDeadLinks: true,
head: [ sitemap: {
["meta", { name: "theme-color", content: "#7bc5e4" }], hostname: info.hostname,
["meta", { name: "og:type", content: "website" }],
["meta", { name: "og:locale", content: "en" }],
],
vite: {
plugins: [
UnoCSS({
presets: [
presetUno(),
presetAttributify(),
presetIcons({
scale: 1.2,
extraProperties: {
display: "inline-block",
"vertical-align": "middle",
},
}),
],
}),
],
},
themeConfig: {
search: {
provider: "local",
}, },
outline: "deep", head: [
logo: "/fmhy.ico", ["meta", { name: "theme-color", content: "#7bc5e4" }],
nav: [ ["meta", { name: "og:type", content: "website" }],
{ text: "Beginners Guide", link: "/Beginners-Guide"}, ["meta", { name: "og:locale", content: "en" }],
{ text: "Glossary", link: "https://rentry.org/The-Piracy-Glossary" }, ["meta", { property: "og:type", content: "website" }],
{ text: "Guides", link: "https://rentry.co/fmhy-guides" }, ["meta", { property: "og:title", content: info.name }],
{ text: "Backups", link: "https://www.reddit.com/r/FREEMEDIAHECKYEAH/wiki/backups" }, // ["meta", { property: "og:image", content: ogImage }],
{ text: "Updates", link: "https://www.reddit.com/r/FREEMEDIAHECKYEAH/wiki/updates/" }, ["meta", { property: "og:description", content: info.description }],
// ["meta", { property: "og:url", content: ogUrl }],
["link", { rel: "icon", href: "/favicon.ico", sizes: "any" }],
["link", { rel: "icon", href: "/logo.svg", type: "image/svg+xml" }],
["link", { rel: "apple-touch-icon", href: "/apple-touch-icon.png" }],
["meta", { name: "apple-mobile-web-app-status-bar-style", content: "black-translucent" }],
["meta", { name: "author", content: "Joaquín Sánchez" }],
["meta", { name: "keywords", content: info.keywords.join(" ") }],
["meta", { name: "twitter:description", content: info.description }],
["meta", { name: "twitter:title", content: info.name }],
["meta", { name: "twitter:card", content: "summary_large_image" }],
// ["meta", { name: "twitter:image", content: ogImage }],
["meta", { name: "twitter:site", content: info.hostname }],
// ["meta", { name: "twitter:url", content: ogUrl }],
], ],
sidebar: [ vite: {
{ text: "🏴‍☠️ Beginners Guide to Piracy", link: "/Beginners-Guide" }, plugins: [
{ text: "📛 Adblocking / Privacy", link: "/AdblockVPNGuide" }, UnoCSS({
{ text: "🤖 Artificial Intelligence", link: "/AI" }, presets: [
{ text: "📺 Movies / TV / Anime", link: "/VideoPiracyGuide" }, presetUno(),
{ text: "🎵 Music / Podcasts / Radio", link: "/AudioPiracyGuide" }, presetAttributify(),
{ text: "🎮 Gaming / Emulation", link: "/GamingPiracyGuide" }, presetIcons({
{ text: "📗 Books / Comics / Manga", link: "/ReadingPiracyGuide" }, scale: 1.2,
{ text: "💾 Downloading", link: "/DownloadPiracyGuide" }, extraProperties: {
{ text: "🌀 Torrenting", link: "/TorrentPiracyGuide" }, display: "inline-block",
{ text: "🧠 Educational", link: "/EDUPiracyGuide" }, "vertical-align": "middle",
{ text: "🔧 Tools", link: "/TOOLSGuide" }, },
{ text: "📷 Image Tools", link: "/img-tools" }, }),
{ text: "👨‍💻 Developer Tools", link: "/DEVTools" }, ],
{ text: "📱 Android / iOS", link: "/Android-iOSGuide" }, }),
{ text: "🐧 Linux / MacOS", link: "/LinuxGuide" }, ],
{ text: "🌍 Non-English", link: "/Non-English" }, },
{ text: "📂 Miscellaneous", link: "/MISCGuide" }, themeConfig: {
{ text: "🔞 NSFW", link: "/NSFWPiracy" }, search: {
{ text: "⚠️ Unsafe Sites", link: "/UnsafeSites" }, provider: "local",
{ text: "🔑 Base64", link: "/base64" },
{ text: "📦 Storage", link: "/STORAGE" },
],
socialLinks: [
{ icon: "github", link: "https://github.com/fmhy/FMHYEdit" },
{ icon: "discord", link: "https://discord.gg/Stz6y6NgNg" },
{
icon: {
svg: '<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"><path fill="#888888" d="M12 0A12 12 0 0 0 0 12a12 12 0 0 0 12 12a12 12 0 0 0 12-12A12 12 0 0 0 12 0zm5.01 4.744c.688 0 1.25.561 1.25 1.249a1.25 1.25 0 0 1-2.498.056l-2.597-.547l-.8 3.747c1.824.07 3.48.632 4.674 1.488c.308-.309.73-.491 1.207-.491c.968 0 1.754.786 1.754 1.754c0 .716-.435 1.333-1.01 1.614a3.111 3.111 0 0 1 .042.52c0 2.694-3.13 4.87-7.004 4.87c-3.874 0-7.004-2.176-7.004-4.87c0-.183.015-.366.043-.534A1.748 1.748 0 0 1 4.028 12c0-.968.786-1.754 1.754-1.754c.463 0 .898.196 1.207.49c1.207-.883 2.878-1.43 4.744-1.487l.885-4.182a.342.342 0 0 1 .14-.197a.35.35 0 0 1 .238-.042l2.906.617a1.214 1.214 0 0 1 1.108-.701zM9.25 12C8.561 12 8 12.562 8 13.25c0 .687.561 1.248 1.25 1.248c.687 0 1.248-.561 1.248-1.249c0-.688-.561-1.249-1.249-1.249zm5.5 0c-.687 0-1.248.561-1.248 1.25c0 .687.561 1.248 1.249 1.248c.688 0 1.249-.561 1.249-1.249c0-.687-.562-1.249-1.25-1.249zm-5.466 3.99a.327.327 0 0 0-.231.094a.33.33 0 0 0 0 .463c.842.842 2.484.913 2.961.913c.477 0 2.105-.056 2.961-.913a.361.361 0 0 0 .029-.463a.33.33 0 0 0-.464 0c-.547.533-1.684.73-2.512.73c-.828 0-1.979-.196-2.512-.73a.326.326 0 0 0-.232-.095z"/></svg>',
},
link: "https://reddit.com/r/FREEMEDIAHECKYEAH",
}, },
], 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" },
{ text: "Updates", link: "https://www.reddit.com/r/FREEMEDIAHECKYEAH/wiki/updates/" },
],
sidebar: [
{ text: "🏴‍☠️ Beginners Guide to Piracy", link: "/Beginners-Guide" },
{ 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: "🔧 Tools", link: "/TOOLSGuide" },
{ text: "📷 Image Tools", link: "/img-tools" },
{ text: "👨‍💻 Developer Tools", link: "/DEVTools" },
{ text: "📱 Android / iOS", link: "/Android-iOSGuide" },
{ text: "🐧 Linux / MacOS", link: "/LinuxGuide" },
{ text: "🌍 Non-English", link: "/Non-English" },
{ text: "📂 Miscellaneous", link: "/MISCGuide" },
{ text: "🔞 NSFW", link: "/NSFWPiracy" },
{ text: "⚠️ Unsafe Sites", link: "/UnsafeSites" },
{ text: "🔑 Base64", link: "/base64" },
{ text: "📦 Storage", link: "/STORAGE" },
],
socialLinks: [
{ icon: "github", link: "https://github.com/fmhy/FMHYEdit" },
{ icon: "discord", link: "https://discord.gg/Stz6y6NgNg" },
{
icon: {
svg: '<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"><path fill="#888888" d="M12 0A12 12 0 0 0 0 12a12 12 0 0 0 12 12a12 12 0 0 0 12-12A12 12 0 0 0 12 0zm5.01 4.744c.688 0 1.25.561 1.25 1.249a1.25 1.25 0 0 1-2.498.056l-2.597-.547l-.8 3.747c1.824.07 3.48.632 4.674 1.488c.308-.309.73-.491 1.207-.491c.968 0 1.754.786 1.754 1.754c0 .716-.435 1.333-1.01 1.614a3.111 3.111 0 0 1 .042.52c0 2.694-3.13 4.87-7.004 4.87c-3.874 0-7.004-2.176-7.004-4.87c0-.183.015-.366.043-.534A1.748 1.748 0 0 1 4.028 12c0-.968.786-1.754 1.754-1.754c.463 0 .898.196 1.207.49c1.207-.883 2.878-1.43 4.744-1.487l.885-4.182a.342.342 0 0 1 .14-.197a.35.35 0 0 1 .238-.042l2.906.617a1.214 1.214 0 0 1 1.108-.701zM9.25 12C8.561 12 8 12.562 8 13.25c0 .687.561 1.248 1.25 1.248c.687 0 1.248-.561 1.248-1.249c0-.688-.561-1.249-1.249-1.249zm5.5 0c-.687 0-1.248.561-1.248 1.25c0 .687.561 1.248 1.249 1.248c.688 0 1.249-.561 1.249-1.249c0-.687-.562-1.249-1.25-1.249zm-5.466 3.99a.327.327 0 0 0-.231.094a.33.33 0 0 0 0 .463c.842.842 2.484.913 2.961.913c.477 0 2.105-.056 2.961-.913a.361.361 0 0 0 .029-.463a.33.33 0 0 0-.464 0c-.547.533-1.684.73-2.512.73c-.828 0-1.979-.196-2.512-.73a.326.326 0 0 0-.232-.095z"/></svg>',
},
link: "https://reddit.com/r/FREEMEDIAHECKYEAH",
},
],
...pwa,
},
}),
);

7
.vitepress/constants.ts Normal file
View File

@ -0,0 +1,7 @@
export const meta = {
name: "FreeMediaHeckYeah",
description:
"The Largest Collection Of Free Stuff On The Internet!The Largest Collection Of Free Stuff On The Internet!",
hostname: "https://fmhy.pages.dev",
keywords: ["stream", "movies", "gaming", "reading", "anime"],
};

89
.vitepress/pwa.ts Normal file
View File

@ -0,0 +1,89 @@
import type { PwaOptions } from "@vite-pwa/vitepress";
import { info } from "./constants";
export const pwa = {
outDir: ".vitepress/dist",
registerType: "autoUpdate",
includeManifestIcons: false,
manifest: {
id: "/",
name: info.name,
short_name: info.name,
description: info.description,
theme_color: "#ffffff",
start_url: "/",
lang: "en-US",
dir: "ltr",
orientation: "natural",
display: "standalone",
display_override: ["window-controls-overlay"],
categories: info.keywords,
icons: [
{
src: "pwa-64x64.png",
sizes: "64x64",
type: "image/png",
},
{
src: "pwa-192x192.png",
sizes: "192x192",
type: "image/png",
},
{
src: "pwa-512x512.png",
sizes: "512x512",
type: "image/png",
purpose: "any",
},
{
src: "maskable-icon.png",
sizes: "512x512",
type: "image/png",
purpose: "maskable",
},
],
handle_links: "preferred",
launch_handler: {
client_mode: ["navigate-existing", "auto"],
},
edge_side_panel: {
preferred_width: 480,
},
},
experimental: {
includeAllowlist: true,
},
workbox: {
globPatterns: ["**/*.{css,js,html,svg,png,ico,txt,woff2,json}"],
runtimeCaching: [
{
urlPattern: /^https:\/\/fonts\.googleapis\.com\/.*/i,
handler: "CacheFirst",
options: {
cacheName: "google-fonts-cache",
expiration: {
maxEntries: 10,
maxAgeSeconds: 60 * 60 * 24 * 365, // <== 365 days
},
cacheableResponse: {
statuses: [0, 200],
},
},
},
{
urlPattern: /^https:\/\/fonts\.gstatic\.com\/.*/i,
handler: "CacheFirst",
options: {
cacheName: "gstatic-fonts-cache",
expiration: {
maxEntries: 10,
maxAgeSeconds: 60 * 60 * 24 * 365, // <== 365 days
},
cacheableResponse: {
statuses: [0, 200],
},
},
},
],
},
} satisfies PwaOptions;

View File

@ -1,8 +1,12 @@
import { h } from "vue"; import { h } from "vue";
import "uno.css"; import {type Theme, inBrowser } from "vitepress";
import type { Theme } from "vitepress";
import DefaultTheme from "vitepress/theme"; import DefaultTheme from "vitepress/theme";
import "./style.css"; import "./style.css";
import "uno.css";
if (inBrowser)
import('./pwa')
export default { export default {
Layout: () => { Layout: () => {

3
.vitepress/theme/pwa.ts Normal file
View File

@ -0,0 +1,3 @@
import { registerSW } from 'virtual:pwa-register'
registerSW({ immediate: true })

View File

@ -13,8 +13,9 @@
"vue": "^3.3.7" "vue": "^3.3.7"
}, },
"devDependencies": { "devDependencies": {
"@iconify-json/simple-icons": "^1.1.76", "@iconify-json/carbon": "^1.1.21",
"@iconify-json/twemoji": "^1.1.12", "@types/node": "^20.8.9",
"@vite-pwa/vitepress": "^0.2.3",
"prettier": "^3.0.3" "prettier": "^3.0.3"
} }
} }

2733
pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff

20
tsconfig.json Normal file
View File

@ -0,0 +1,20 @@
{
"compilerOptions": {
"baseUrl": ".",
"module": "esnext",
"target": "esnext",
"lib": ["DOM", "ESNext"],
"strict": true,
"jsx": "preserve",
"esModuleInterop": true,
"skipLibCheck": true,
"moduleResolution": "node",
"resolveJsonModule": true,
"noUnusedLocals": true,
"strictNullChecks": true,
"forceConsistentCasingInFileNames": true,
"types": ["vite/client", "vite-plugin-pwa/vanillajs", "vitepress"]
},
"include": ["./*.ts", "./.vitepress/**/*.ts"],
"exclude": ["dist", "node_modules"]
}