diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 000000000..d96586674 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,317 @@ +# Common settings that generally should always be used with your language specific settings + +# Auto detect text files and perform LF normalization +* text=auto + +# +# The above will handle all files NOT found below +# + +# Documents +*.bibtex text diff=bibtex +*.doc diff=astextplain +*.DOC diff=astextplain +*.docx diff=astextplain +*.DOCX diff=astextplain +*.dot diff=astextplain +*.DOT diff=astextplain +*.pdf diff=astextplain +*.PDF diff=astextplain +*.rtf diff=astextplain +*.RTF diff=astextplain +*.md text diff=markdown +*.mdx text diff=markdown +*.tex text diff=tex +*.adoc text +*.textile text +*.mustache text +*.csv text eol=crlf +*.tab text +*.tsv text +*.txt text +*.sql text +*.epub diff=astextplain + +# Graphics +*.png binary +*.jpg binary +*.jpeg binary +*.gif binary +*.tif binary +*.tiff binary +*.ico binary +# SVG treated as text by default. +*.svg text +# If you want to treat it as binary, +# use the following line instead. +# *.svg binary +*.eps binary + +# Scripts +*.bash text eol=lf +*.fish text eol=lf +*.ksh text eol=lf +*.sh text eol=lf +*.zsh text eol=lf +# These are explicitly windows files and should use crlf +*.bat text eol=crlf +*.cmd text eol=crlf +*.ps1 text eol=crlf + +# Serialisation +*.json text +*.toml text +*.xml text +*.yaml text +*.yml text + +# Archives +*.7z binary +*.bz binary +*.bz2 binary +*.bzip2 binary +*.gz binary +*.lz binary +*.lzma binary +*.rar binary +*.tar binary +*.taz binary +*.tbz binary +*.tbz2 binary +*.tgz binary +*.tlz binary +*.txz binary +*.xz binary +*.Z binary +*.zip binary +*.zst binary + +# Text files where line endings should be preserved +*.patch -text + +# +# Exclude files from exporting +# + +.gitattributes export-ignore +.gitignore export-ignore +.gitkeep export-ignore + +## GITATTRIBUTES FOR WEB PROJECTS +# +# These settings are for any web project. +# +# Details per file setting: +# text These files should be normalized (i.e. convert CRLF to LF). +# binary These files are binary and should be left untouched. +# +# Note that binary is a macro for -text -diff. +###################################################################### + +# Auto detect +## Handle line endings automatically for files detected as +## text and leave all files detected as binary untouched. +## This will handle all files NOT defined below. +* text=auto + +# Source code +*.bash text eol=lf +*.bat text eol=crlf +*.cmd text eol=crlf +*.coffee text +*.css text diff=css +*.htm text diff=html +*.html text diff=html +*.inc text +*.ini text +*.js text +*.mjs text +*.cjs text +*.json text +*.jsx text +*.less text +*.ls text +*.map text -diff +*.od text +*.onlydata text +*.php text diff=php +*.pl text +*.ps1 text eol=crlf +*.py text diff=python +*.rb text diff=ruby +*.sass text +*.scm text +*.scss text diff=css +*.sh text eol=lf +.husky/* text eol=lf +*.sql text +*.styl text +*.tag text +*.ts text +*.tsx text +*.xml text +*.xhtml text diff=html + +# Docker +Dockerfile text + +# Documentation +*.ipynb text eol=lf +*.markdown text diff=markdown +*.md text diff=markdown +*.mdwn text diff=markdown +*.mdown text diff=markdown +*.mkd text diff=markdown +*.mkdn text diff=markdown +*.mdtxt text +*.mdtext text +*.txt text +AUTHORS text +CHANGELOG text +CHANGES text +CONTRIBUTING text +COPYING text +copyright text +*COPYRIGHT* text +INSTALL text +license text +LICENSE text +NEWS text +readme text +*README* text +TODO text + +# Templates +*.dot text +*.ejs text +*.erb text +*.haml text +*.handlebars text +*.hbs text +*.hbt text +*.jade text +*.latte text +*.mustache text +*.njk text +*.phtml text +*.svelte text +*.tmpl text +*.tpl text +*.twig text +*.vue text + +# Configs +*.cnf text +*.conf text +*.config text +.editorconfig text +.env text +.gitattributes text +.gitconfig text +.htaccess text +*.lock text -diff +package.json text eol=lf +package-lock.json text eol=lf -diff +pnpm-lock.yaml text eol=lf -diff +.prettierrc text +yarn.lock text -diff +*.toml text +*.yaml text +*.yml text +browserslist text +Makefile text +makefile text +# Fixes syntax highlighting on GitHub to allow comments +tsconfig.json linguist-language=JSON-with-Comments + +# Heroku +Procfile text + +# Graphics +*.ai binary +*.bmp binary +*.eps binary +*.gif binary +*.gifv binary +*.ico binary +*.jng binary +*.jp2 binary +*.jpg binary +*.jpeg binary +*.jpx binary +*.jxr binary +*.pdf binary +*.png binary +*.psb binary +*.psd binary +# SVG treated as an asset (binary) by default. +*.svg text +# If you want to treat it as binary, +# use the following line instead. +# *.svg binary +*.svgz binary +*.tif binary +*.tiff binary +*.wbmp binary +*.webp binary + +# Audio +*.kar binary +*.m4a binary +*.mid binary +*.midi binary +*.mp3 binary +*.ogg binary +*.ra binary + +# Video +*.3gpp binary +*.3gp binary +*.as binary +*.asf binary +*.asx binary +*.avi binary +*.fla binary +*.flv binary +*.m4v binary +*.mng binary +*.mov binary +*.mp4 binary +*.mpeg binary +*.mpg binary +*.ogv binary +*.swc binary +*.swf binary +*.webm binary + +# Archives +*.7z binary +*.gz binary +*.jar binary +*.rar binary +*.tar binary +*.zip binary + +# Fonts +*.ttf binary +*.eot binary +*.otf binary +*.woff binary +*.woff2 binary + +# Executables +*.exe binary +*.pyc binary +# Prevents massive diffs caused by vendored, minified files +**/.yarn/releases/** binary +**/.yarn/plugins/** binary + +# RC files (like .babelrc or .eslintrc) +*.*rc text + +# Ignore files (like .npmignore or .gitignore) +*.*ignore text + +# Prevents massive diffs from built files +dist/* binary + diff --git a/.prettierignore b/.prettierignore index 3cd9fe28e..e907abfe7 100644 --- a/.prettierignore +++ b/.prettierignore @@ -1,4 +1,5 @@ **/*.md +!docs/index.md pnpm-lock.yaml .turbo .cache diff --git a/biome.json b/biome.json index 2d63b9da3..1c5184365 100644 --- a/biome.json +++ b/biome.json @@ -11,6 +11,26 @@ "formatter": { "enabled": false }, + "css": { + "linter": { + "enabled": false + }, + "formatter": { + "enabled": false + } + }, + "json": { + "formatter": { + "enabled": false + }, + "linter": { + "enabled": false + } + }, + "vcs": { + "enabled": true, + "clientKind": "git" + }, "javascript": { "globals": [ "defineNitroConfig", diff --git a/docs/.vitepress/config.mts b/docs/.vitepress/config.mts index 374c64f8c..2143ae51a 100644 --- a/docs/.vitepress/config.mts +++ b/docs/.vitepress/config.mts @@ -1,6 +1,8 @@ import consola from 'consola' import UnoCSS from 'unocss/vite' import AutoImport from 'unplugin-auto-import/vite' +import OptimizeExclude from 'vite-plugin-optimize-exclude' +import Terminal from 'vite-plugin-terminal' import { defineConfig } from 'vitepress' import { commitRef, @@ -53,8 +55,16 @@ export default defineConfig({ .finally(() => consola.success('Success!')) }, vite: { + ssr: { + noExternal: ['@fmhy/components'] + }, optimizeDeps: { exclude: ['workbox-window'] }, plugins: [ + OptimizeExclude(), + Terminal({ + console: 'terminal', + output: ['console', 'terminal'] + }), UnoCSS({ configFile: '../unocss.config.ts' }), @@ -112,7 +122,6 @@ export default defineConfig({ 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' }, { @@ -122,10 +131,8 @@ export default defineConfig({ { text: '🪅 Ecosystem', items: [ + { text: '💙 Feedback', link: '/feedback' }, { text: '🌐 Search', link: '/posts/search' }, - { text: '📰 Posts', link: '/posts' }, - { text: '💬 Feedback', link: '/feedback' }, - { text: '💙 Contribute', link: 'other/contributing' }, { text: '🏞 Wallpapers', link: '/other/wallpapers' }, { text: '📋 snowbin', link: 'https://pastes.fmhy.net' }, { text: '🔍 SearXNG', link: 'https://searx.fmhy.net/' }, diff --git a/docs/.vitepress/constants.ts b/docs/.vitepress/constants.ts index cb37d091f..e8e2eda05 100644 --- a/docs/.vitepress/constants.ts +++ b/docs/.vitepress/constants.ts @@ -28,9 +28,8 @@ export const meta = { export const commitRef = process.env.CF_PAGES && process.env.CF_PAGES_COMMIT_SHA - ? `${process.env.CF_PAGES_COMMIT_SHA.slice(0, 8)}` + ? `${process.env.CF_PAGES_COMMIT_SHA.slice(0, 8)}` : 'dev' export const feedback = `Made with ❤` @@ -120,7 +119,7 @@ export const socialLinks: DefaultTheme.SocialLink[] = [ { ariaLabel: 'Bluesky', icon: { - svg: 'Bluesky' + svg: 'Bluesky' }, link: 'https://bsky.app/profile/fmhy.bsky.social' } @@ -128,59 +127,79 @@ export const socialLinks: DefaultTheme.SocialLink[] = [ export const sidebar: DefaultTheme.Sidebar | DefaultTheme.NavItemWithLink[] = [ { - text: ' Adblocking / Privacy', - link: '/adblockvpnguide' + text: ' Beginners Guide', + link: '/beginners-guide' }, { - text: ' Artificial Intelligence', - link: '/ai' + text: ' Posts', + link: '/posts' }, { - text: ' Movies / TV / Anime', - link: '/videopiracyguide' + text: ' Contribute', + link: '/other/contributing' + }, + + // TODO: genetate sidebar from posts + { + text: 'Wiki', + collapsed: false, + items: [ + { + 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' + } + ] }, { - 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' - }, - { - text: ' Tools', + text: 'Tools', collapsed: false, items: [ { @@ -230,7 +249,7 @@ export const sidebar: DefaultTheme.Sidebar | DefaultTheme.NavItemWithLink[] = [ ] }, { - text: ' More', + text: 'More', collapsed: true, items: [ { diff --git a/docs/.vitepress/theme/Layout.vue b/docs/.vitepress/theme/Layout.vue index e499c04c6..8b047f114 100644 --- a/docs/.vitepress/theme/Layout.vue +++ b/docs/.vitepress/theme/Layout.vue @@ -50,6 +50,12 @@ const { Layout } = DefaultTheme + diff --git a/docs/.vitepress/theme/PostLayout.vue b/docs/.vitepress/theme/PostLayout.vue index a3381cc25..9cc40a6f3 100644 --- a/docs/.vitepress/theme/PostLayout.vue +++ b/docs/.vitepress/theme/PostLayout.vue @@ -2,7 +2,7 @@ import Authors from './components/Authors.vue' const props = defineProps<{ - authors: string[] + authors: string }>() const formatDate = (raw: string): string => { @@ -14,10 +14,11 @@ const formatDate = (raw: string): string => { } const { frontmatter } = useData() +const authors = computed(() => props.authors.split(',')) diff --git a/docs/.vitepress/theme/index.ts b/docs/.vitepress/theme/index.ts index 34d677d59..ee4578977 100644 --- a/docs/.vitepress/theme/index.ts +++ b/docs/.vitepress/theme/index.ts @@ -15,13 +15,14 @@ */ import type { Theme } from 'vitepress' +import Components from '@fmhy/components' import DefaultTheme from 'vitepress/theme' import { loadProgress } from './composables/nprogress' import Layout from './Layout.vue' import Post from './PostLayout.vue' import './style.scss' -import 'uno.css' +import 'virtual:uno.css' import Feedback from './components/Feedback.vue' @@ -29,6 +30,7 @@ export default { extends: DefaultTheme, Layout, enhanceApp({ router, app }) { + app.use(Components) app.component('Post', Post) app.component('Feedback', Feedback) loadProgress(router) diff --git a/docs/.vitepress/theme/posts.data.ts b/docs/.vitepress/theme/posts.data.ts index 045305bb7..5a79b455d 100644 --- a/docs/.vitepress/theme/posts.data.ts +++ b/docs/.vitepress/theme/posts.data.ts @@ -1,7 +1,3 @@ -import type { ContentData } from 'vitepress' -import { createContentLoader } from 'vitepress' -import { groupBy } from '../utils' - /** * Copyright (c) taskylizard. All rights reserved. * @@ -18,18 +14,22 @@ import { groupBy } from '../utils' * limitations under the License. */ +import type { ContentData } from 'vitepress' +import { createContentLoader } from 'vitepress' +import { groupBy } from '../utils' + interface Post { title: string url: string date: string } -type Dictionary = ReturnType +type Dictionary = ReturnType declare const data: Dictionary export { data } -function transformRawPosts(rawPosts: ContentData[]): Record { +function transformRawPosts(rawPosts: ContentData[]): Record { const posts: Post[] = rawPosts .map(({ url, frontmatter }) => ({ title: frontmatter.title, diff --git a/docs/index.md b/docs/index.md index b2491114a..7f28eeddf 100644 --- a/docs/index.md +++ b/docs/index.md @@ -4,8 +4,7 @@ layout: home description: The largest collection of free stuff on the internet! hero: - name: FMHY - text: freemediaheckyeah + name: freemediaheckyeah tagline: The largest collection of free stuff on the internet! prelink: title: Goodbye Fmovies, and thank you 🤍 @@ -15,8 +14,8 @@ hero: alt: FMHY Icon actions: - theme: brand - text: Browse Collection - link: /adblockvpnguide + text: See Beginners Guide + link: /beginners-guide - theme: alt text: Posts link: /posts @@ -28,22 +27,133 @@ hero: link: https://discord.gg/Stz6y6NgNg features: - - title: Movies / TV / Anime - icon: + - title: Adblocking / Privacy + link: /adblockvpnguide + details: Learn how to block ads, trackers and other nasty things. + icon: | + + + - title: Artificial Intelligence + link: /ai + details: Explore the world of AI and machine learning. + icon: | + + + - title: Streaming link: /videopiracyguide - details: Stream, download, torrent and binge all your favourites movies or shows! - - title: Music / Podcasts / Radio - icon: + details: + Stream, download, torrent and binge all your favourites movies or shows! + icon: | + + + - title: Listening + icon: | + link: /audiopiracyguide - details: Stream, download and torrent songs, podcasts and more! - - title: Games / Emulation - icon: + details: Stream, download and torrent songs, podcasts and more! + + - title: Gaming + icon: | + link: /gamingpiracyguide - details: Download and play all your favourite games or emulate some old but gold ones! - - title: Book / Comics / Manga - icon: + details: + Download and play all your favourite games or emulate some old but gold + ones! + + - title: Reading + icon: | + link: /readingpiracyguide - details: Whether you're a bookworm, otaku or comic book fan, you'll be able to find your favourite pieces of literature here for free! + details: + Whether you're a bookworm, otaku or comic book fan, you'll be able to find + your favourite pieces of literature here for free! + + - title: Downloading + icon: | + + link: /downloadpiracyguide + details: + Download all your favourite software, movies, tv shows, music, games and more! + + - title: Torrenting + icon: | + + link: /torrentpiracyguide + details: Download your favourite media using the BitTorrent protocol. + + - title: Educational + icon: | + + link: /edupiracyguide + details: Educational content for all ages. + + - title: Android / iOS + icon: | + + link: /android-iosguide + details: All forms of content for Android and iOS. + + - title: Linux / MacOS + icon: | + + link: /linuxguide + details: The $HOME of Linux and MacOS. + + - title: Non English + icon: | + + link: /non-english + details: Content in languages other than English. + + - title: Miscellaneous + icon: | + + link: /miscguide + details: Content too niche to be included elsewhere. ---