diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md
index b4447a2db..f86478a5a 100644
--- a/.github/CONTRIBUTING.md
+++ b/.github/CONTRIBUTING.md
@@ -18,7 +18,7 @@ Please only use the store link if there's neither a site nor a Git repository av
3. Always check to see if the site you'd like to submit has a Discord / Telegram server you can link with it.
-4. Find a suitable category for the link and then submit it by making a **[Pull Request](https://github.com/fmhy/edit/pulls)**.
+4. Find a suitable category for the link and then submit it by making a **[Pull Request](https://github.com/fmhy/edit/pulls)**.
#### Don't Submit:
@@ -102,7 +102,7 @@ Select edit button and make your changes.
### Manually setting up a development environment
-#### Manually
+#### Manual
1. Fork the repository by clicking the "Fork" button in the top right corner.
@@ -126,10 +126,27 @@ You can use [nix](https://nixos.org/) to set up a development environment, we ha
3. Run `nix develop` to enter the development environment.
-4. Make changes.
+4. Make changes.
5. Exit the development environment by running `exit`.
6. Commit your changes and push them to your forked repository.
7. Create a pull request by clicking the "New Pull Request" button in your forked repository, and don't forget to explain why you think the site(s) in question should be removed, unstarred, and/or changed.
+
+
+#### Keeping Your Fork Updated
+
+To keep your fork up to date with the main repository:
+
+```bash
+# Add the upstream remote (only needed once)
+git remote add upstream https://github.com/fmhy/edit.git
+
+# Fetch upstream changes
+git fetch upstream
+
+# Merge upstream changes into your local main branch
+git checkout main
+git merge upstream/main
+```
\ No newline at end of file
diff --git a/.licenserc.json b/.licenserc.json
index 9464af5b3..603aa6ef9 100644
--- a/.licenserc.json
+++ b/.licenserc.json
@@ -1,7 +1,7 @@
{
"**/*.ts": [
"/**",
- "* Copyright (c) taskylizard. All rights reserved.",
+ "* Copyright (c) 2025 taskylizard. Apache License 2.0.",
"*",
"* Licensed under the Apache License, Version 2.0 (the \"License\");",
"* you may not use this file except in compliance with the License.",
@@ -16,6 +16,15 @@
"* limitations under the License.",
"*/"
],
+ "**/*.css": [
+ "/**",
+ "* Copyright (c) 2025 taskylizard. Apache License 2.0.",
+ "* Licensed under the Apache License, Version 2.0 (the \"License\");",
+ "* you may not use this file except in compliance with the License.",
+ "* You may obtain a copy of the License at",
+ "* http://www.apache.org/licenses/LICENSE-2.0",
+ "*/"
+ ],
"ignore": [
"node_modules",
"dist",
diff --git a/.stylelintrc.json b/.stylelintrc.json
deleted file mode 100644
index eff256099..000000000
--- a/.stylelintrc.json
+++ /dev/null
@@ -1,3 +0,0 @@
-{
- "extends": "stylelint-config-standard-scss"
-}
diff --git a/api/README.md b/api/README.md
index f6060fbdd..eb28136e6 100644
--- a/api/README.md
+++ b/api/README.md
@@ -1,6 +1,3 @@
-> [!NOTE]
-> The website is no longer receiving new features and is now in maintenance mode. Please refrain from opening issues or pull requests.
-
This is the API for the website and other related services.
Licensed under the Apache License v2.0, see [LICENSE](../docs/.vitepress/LICENSE) for more information.
diff --git a/api/middleware/cors.ts b/api/middleware/cors.ts
index a625b8bb4..801fb83cb 100644
--- a/api/middleware/cors.ts
+++ b/api/middleware/cors.ts
@@ -1,5 +1,5 @@
/**
- * Copyright (c) taskylizard. All rights reserved.
+ * Copyright (c) 2025 taskylizard. Apache License 2.0.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/api/middleware/ratelimit.ts b/api/middleware/ratelimit.ts
index 200319b49..6b6628d9c 100644
--- a/api/middleware/ratelimit.ts
+++ b/api/middleware/ratelimit.ts
@@ -1,3 +1,18 @@
+/**
+ * Copyright (c) 2025 taskylizard. Apache License 2.0.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
export default defineEventHandler(async (event) => {
const { cloudflare } = event.context
diff --git a/api/routes/feedback.post.ts b/api/routes/feedback.post.ts
index 4ab75db60..34b78218f 100644
--- a/api/routes/feedback.post.ts
+++ b/api/routes/feedback.post.ts
@@ -1,5 +1,5 @@
/**
- * Copyright (c) taskylizard. All rights reserved.
+ * Copyright (c) 2025 taskylizard. Apache License 2.0.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/api/routes/index.ts b/api/routes/index.ts
index 23956fa80..4d2c0440a 100644
--- a/api/routes/index.ts
+++ b/api/routes/index.ts
@@ -1,5 +1,5 @@
/**
- * Copyright (c) taskylizard. All rights reserved.
+ * Copyright (c) 2025 taskylizard. Apache License 2.0.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/api/routes/single-page.ts b/api/routes/single-page.ts
index b36e305d7..8561406bc 100644
--- a/api/routes/single-page.ts
+++ b/api/routes/single-page.ts
@@ -1,5 +1,5 @@
/**
- * Copyright (c) taskylizard. All rights reserved.
+ * Copyright (c) 2025 taskylizard. Apache License 2.0.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/api/tsconfig.json b/api/tsconfig.json
index ab45f2118..378657471 100644
--- a/api/tsconfig.json
+++ b/api/tsconfig.json
@@ -1,8 +1,6 @@
{
"extends": "../.nitro/types/tsconfig.json",
"compilerOptions": {
- "types": [
- "@cloudflare/workers-types"
- ]
+ "types": ["@cloudflare/workers-types"]
}
}
diff --git a/api/worker-configuration.d.ts b/api/worker-configuration.d.ts
index b6e97d8f0..a4ffc8a3a 100644
--- a/api/worker-configuration.d.ts
+++ b/api/worker-configuration.d.ts
@@ -1,6 +1,21 @@
+/**
+ * Copyright (c) 2025 taskylizard. Apache License 2.0.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
// Generated by Wrangler by running `wrangler types api/worker-configuration.d.ts`
interface Env {
- STORAGE: KVNamespace;
- RATE_LIMITER: RateLimit;
+ STORAGE: KVNamespace
+ RATE_LIMITER: RateLimit
}
diff --git a/biome.json b/biome.json
deleted file mode 100644
index 352c3f444..000000000
--- a/biome.json
+++ /dev/null
@@ -1,57 +0,0 @@
-{
- "$schema": "https://biomejs.dev/schemas/1.8.3/schema.json",
- "extends": [
- "@taskylizard/biome-config",
- "./.cache/imports.json"
- ],
- "files": {
- "ignore": [
- "docs/.vitepress/**/*.vue",
- "docs/.vitepress/vue-shim.d.ts",
- ".cache/imports.d.ts"
- ]
- },
- "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",
- "eventHandler",
- "useRuntimeConfig",
- "readValidatedBody",
- "defineEventHandler"
- ]
- },
- "linter": {
- "rules": {
- "correctness": {
- "noUndeclaredVariables": "off"
- },
- "style": {
- "useFilenamingConvention": "off",
- "noDefaultExport": "off"
- }
- }
- }
-}
diff --git a/docs/.vitepress/README.md b/docs/.vitepress/README.md
index d65eea6c0..e2da1674c 100644
--- a/docs/.vitepress/README.md
+++ b/docs/.vitepress/README.md
@@ -1,6 +1,3 @@
-> [!NOTE]
-> The website is no longer receiving new features and is now in maintenance mode. Please refrain from opening issues or pull requests.
-
This is the website source code to be used with [VitePress](https://vitepress.dev/).
Licensed under the Apache License v2.0, see [LICENSE](./LICENSE) for more information.
diff --git a/docs/.vitepress/config.mts b/docs/.vitepress/config.mts
index 90b5d533d..683f61981 100644
--- a/docs/.vitepress/config.mts
+++ b/docs/.vitepress/config.mts
@@ -18,7 +18,7 @@ import { generateFeed, generateImages, generateMeta } from './hooks'
import { defs, emojiRender, movePlugin } from './markdown/emoji'
import { headersPlugin } from './markdown/headers'
import { toggleStarredPlugin } from './markdown/toggleStarred'
-import { transforms } from './transformer'
+import { transformsPlugin } from './transformer'
// @unocss-include
@@ -116,7 +116,7 @@ export default defineConfig({
filepath: './.cache/imports.json'
}
}),
- transforms(),
+ transformsPlugin(),
{
name: 'custom:adjust-order',
configResolved(c) {
@@ -145,7 +145,7 @@ export default defineConfig({
config(md) {
md.use(emojiRender)
md.use(toggleStarredPlugin)
- md.use(headersPlugin)
+ meta.build.api && md.use(headersPlugin)
}
},
themeConfig: {
diff --git a/docs/.vitepress/constants.ts b/docs/.vitepress/constants.ts
index 330fea359..24d761014 100644
--- a/docs/.vitepress/constants.ts
+++ b/docs/.vitepress/constants.ts
@@ -1,5 +1,5 @@
/**
- * Copyright (c) taskylizard. All rights reserved.
+ * Copyright (c) 2025 taskylizard. Apache License 2.0.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -15,6 +15,7 @@
*/
import type { DefaultTheme } from 'vitepress'
+import consola from 'consola'
import { transform, transformGuide } from './transformer'
// @unocss-include
@@ -23,14 +24,31 @@ export const meta = {
name: 'freemediaheckyeah',
description: 'The largest collection of free stuff on the internet!',
hostname: 'https://fmhy.net',
- keywords: ['stream', 'movies', 'gaming', 'reading', 'anime']
+ keywords: ['stream', 'movies', 'gaming', 'reading', 'anime'],
+ build: {
+ api: true,
+ nsfw: true
+ }
}
+if (process.env.FMHY_BUILD_NSFW === 'false') {
+ consola.info('FMHY_BUILD_NSFW is set to false, disabling NSFW content')
+ meta.build.nsfw = false
+}
+if (process.env.FMHY_BUILD_API === 'false') {
+ consola.info('FMHY_BUILD_API is set to false, disabling API component')
+ meta.build.api = false
+}
+
+const formatCommitRef = (commitRef: string) =>
+ `${commitRef.slice(0, 8)}`
+
export const commitRef =
process.env.CF_PAGES && process.env.CF_PAGES_COMMIT_SHA
- ? `${process.env.CF_PAGES_COMMIT_SHA.slice(0, 8)}`
- : 'dev'
+ ? formatCommitRef(process.env.CF_PAGES_COMMIT_SHA)
+ : process.env.COMMIT_REF
+ ? formatCommitRef(process.env.COMMIT_REF)
+ : 'dev'
export const feedback = `Made with ❤`
@@ -113,17 +131,11 @@ export const socialLinks: DefaultTheme.SocialLink[] = [
{ icon: 'github', link: 'https://github.com/fmhy/edit' },
{ icon: 'discord', link: 'https://rentry.co/fmhy-invite' },
{
- ariaLabel: 'Reddit',
- icon: {
- svg: ''
- },
+ icon: 'reddit',
link: 'https://reddit.com/r/FREEMEDIAHECKYEAH'
},
{
- ariaLabel: 'Bluesky',
- icon: {
- svg: ''
- },
+ icon: 'bluesky',
link: 'https://bsky.app/profile/fmhy.net'
}
]
@@ -141,14 +153,21 @@ export const nav: DefaultTheme.NavItem[] = [
{ text: '🔗 Bookmarks', link: 'https://github.com/fmhy/bookmarks' },
{ text: '✅ SafeGuard', link: 'https://github.com/fmhy/FMHY-SafeGuard' },
{ text: '📋 snowbin', link: 'https://pastes.fmhy.net' },
- { text: '💡 Site Hunting', link: 'https://www.reddit.com/r/FREEMEDIAHECKYEAH/wiki/find-new-sites/' },
- { text: '🏞 Wallpapers', link: '/other/wallpapers' },
- { text: '💙 Feedback', link: '/feedback' },
+ {
+ text: '💡 Site Hunting',
+ link: 'https://www.reddit.com/r/FREEMEDIAHECKYEAH/wiki/find-new-sites/'
+ },
{ text: '❓ FAQs', link: 'https://redd.it/xrxen7' },
{
text: '😇 SFW FMHY',
link: 'https://fmhy.xyz/'
- }
+ },
+ {
+ text: '🏠 Selfhosting',
+ link: '/other/selfhosting'
+ },
+ { text: '🏞 Wallpapers', link: '/other/wallpapers' },
+ { text: '💙 Feedback', link: '/feedback' }
]
}
]
@@ -166,8 +185,6 @@ export const sidebar: DefaultTheme.Sidebar | DefaultTheme.NavItemWithLink[] = [
text: ' Contribute',
link: '/other/contributing'
},
-
- // TODO: genetate sidebar from posts
{
text: 'Wiki',
collapsed: false,
@@ -280,10 +297,12 @@ export const sidebar: DefaultTheme.Sidebar | DefaultTheme.NavItemWithLink[] = [
text: 'More',
collapsed: true,
items: [
- {
- text: ' NSFW',
- link: 'https://rentry.co/NSFW-Checkpoint'
- },
+ meta.build.nsfw
+ ? {
+ text: ' NSFW',
+ link: 'https://rentry.co/NSFW-Checkpoint'
+ }
+ : {},
{
text: ' Unsafe Sites',
link: '/unsafesites'
diff --git a/docs/.vitepress/hooks/index.ts b/docs/.vitepress/hooks/index.ts
index 6bf435df8..be29d2cbd 100644
--- a/docs/.vitepress/hooks/index.ts
+++ b/docs/.vitepress/hooks/index.ts
@@ -1,5 +1,5 @@
/**
- * Copyright (c) taskylizard. All rights reserved.
+ * Copyright (c) 2025 taskylizard. Apache License 2.0.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/docs/.vitepress/hooks/meta.ts b/docs/.vitepress/hooks/meta.ts
index 1269fdf74..be455b25c 100644
--- a/docs/.vitepress/hooks/meta.ts
+++ b/docs/.vitepress/hooks/meta.ts
@@ -1,5 +1,5 @@
/**
- * Copyright (c) taskylizard. All rights reserved.
+ * Copyright (c) 2025 taskylizard. Apache License 2.0.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -21,6 +21,7 @@ export function generateMeta(context: TransformContext, hostname: string) {
const { pageData } = context
if (pageData.isNotFound) return head
+ if (Object.keys(pageData.frontmatter).length === 0) return head
const url = `${hostname}/${pageData.relativePath.replace(/((^|\/)index)?\.md$/, '$2')}`
diff --git a/docs/.vitepress/hooks/opengraph.ts b/docs/.vitepress/hooks/opengraph.ts
index a7679be22..f37423801 100644
--- a/docs/.vitepress/hooks/opengraph.ts
+++ b/docs/.vitepress/hooks/opengraph.ts
@@ -1,5 +1,5 @@
/**
- * Copyright (c) taskylizard. All rights reserved.
+ * Copyright (c) 2025 taskylizard. Apache License 2.0.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -88,14 +88,14 @@ async function generateImage({
const _page = getPage(url)
const title =
frontmatter.layout === 'home'
- ? frontmatter.hero.name ?? frontmatter.title
+ ? (frontmatter.hero.name ?? frontmatter.title)
: frontmatter.title
? frontmatter.title
: _page?.title
const description =
frontmatter.layout === 'home'
- ? frontmatter.hero.tagline ?? frontmatter.description
+ ? (frontmatter.hero.tagline ?? frontmatter.description)
: frontmatter.description
? frontmatter.description
: _page?.description
diff --git a/docs/.vitepress/hooks/rss.ts b/docs/.vitepress/hooks/rss.ts
index fdf1a1934..cdf4373f7 100644
--- a/docs/.vitepress/hooks/rss.ts
+++ b/docs/.vitepress/hooks/rss.ts
@@ -1,5 +1,5 @@
/**
- * Copyright (c) taskylizard. All rights reserved.
+ * Copyright (c) 2025 taskylizard. Apache License 2.0.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -22,7 +22,7 @@ import { Feed } from 'feed'
import { createContentLoader } from 'vitepress'
import { meta } from '../constants'
-export async function generateFeed(config: SiteConfig): Promise {
+export async function generateFeed(config: SiteConfig): Promise {
const feed: Feed = new Feed({
id: meta.hostname,
link: meta.hostname,
diff --git a/docs/.vitepress/hooks/satoriConfig.ts b/docs/.vitepress/hooks/satoriConfig.ts
index 2e0b972ae..de5fad368 100644
--- a/docs/.vitepress/hooks/satoriConfig.ts
+++ b/docs/.vitepress/hooks/satoriConfig.ts
@@ -1,5 +1,5 @@
/**
- * Copyright (c) taskylizard. All rights reserved.
+ * Copyright (c) 2025 taskylizard. Apache License 2.0.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/docs/.vitepress/markdown/base64.ts b/docs/.vitepress/markdown/base64.ts
index 47a462ba2..618339223 100644
--- a/docs/.vitepress/markdown/base64.ts
+++ b/docs/.vitepress/markdown/base64.ts
@@ -1,5 +1,5 @@
/**
- * Copyright (c) taskylizard. All rights reserved.
+ * Copyright (c) 2025 taskylizard. Apache License 2.0.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/docs/.vitepress/markdown/emoji.ts b/docs/.vitepress/markdown/emoji.ts
index cfa05006b..3b731a8d6 100644
--- a/docs/.vitepress/markdown/emoji.ts
+++ b/docs/.vitepress/markdown/emoji.ts
@@ -1,5 +1,5 @@
/**
- * Copyright (c) taskylizard. All rights reserved.
+ * Copyright (c) 2025 taskylizard. Apache License 2.0.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/docs/.vitepress/markdown/headers.ts b/docs/.vitepress/markdown/headers.ts
index d97e7aaac..6bcc2a8b0 100644
--- a/docs/.vitepress/markdown/headers.ts
+++ b/docs/.vitepress/markdown/headers.ts
@@ -1,3 +1,18 @@
+/**
+ * Copyright (c) 2025 taskylizard. Apache License 2.0.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
/**
* Copyright (c) 2024 taskylizard
*
@@ -53,10 +68,10 @@ export const headersPlugin = (md: MarkdownRenderer) => {
return result
}
- let defaultRender = md.renderer.rules.link_open
+ const defaultRender = md.renderer.rules.link_open
md.renderer.rules.link_open = (tokens, idx, options, env, self) => {
- const result = defaultRender!!!!!!!!!!!(tokens, idx, options, env, self)
+ const result = defaultRender!!!!!!!!!!(tokens, idx, options, env, self)
const meta = tokens[idx].meta
if (!meta || !meta.feedback) return result
diff --git a/docs/.vitepress/markdown/toggleStarred.ts b/docs/.vitepress/markdown/toggleStarred.ts
index 66010ab42..4047de36c 100644
--- a/docs/.vitepress/markdown/toggleStarred.ts
+++ b/docs/.vitepress/markdown/toggleStarred.ts
@@ -1,5 +1,5 @@
/**
- * Copyright (c) taskylizard. All rights reserved.
+ * Copyright (c) 2025 taskylizard. Apache License 2.0.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/docs/.vitepress/theme/components/Feedback.vue b/docs/.vitepress/theme/components/Feedback.vue
index 888d34414..38a1c5dc5 100644
--- a/docs/.vitepress/theme/components/Feedback.vue
+++ b/docs/.vitepress/theme/components/Feedback.vue
@@ -1,7 +1,8 @@