diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 3259eca36..cfc356f49 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -1,153 +1,123 @@ -# How to Edit FMHY +# Contribute Guide -There are multiple ways you can contribute to this repository: -- [Link submissions](#submitting-a-link) -- [Reporting a site](#reporting-a-site) -- [Changes to the website itself](#making-changes) -- [Finding new sites](https://www.reddit.com/r/FREEMEDIAHECKYEAH/wiki/find-new-sites/) +> [!INFO] NOTE +> Some of these steps are easier if you're in our [Discord](https://rentry.co/fmhy-invite). It opens every Friday. -## Submitting a Link +Here you'll find some general guidelines for those who would like to start contributing. There are multiple ways to do this: -> [!NOTE] -> If you haven't tested the link you'd like to submit, especially if it's a DDL site, please open an **[Issue](https://github.com/fmhy/edit/issues)** or reach out to us on **[Discord](https://rentry.co/fmhy-invite)** rather than making a Pull Request. +- [Link Submissions](#additions) +- [Reporting an Existing Site](#reporting-a-site) +- [How to Edit and Preview Changes](#making-changes) +- [Finding New Sites](https://www.reddit.com/r/FREEMEDIAHECKYEAH/wiki/find-new-sites/) -1. Before submitting a link, please **[search](https://redd.it/105xraz)** to make sure it's not already in the wiki. +## Submissions -2. The order of priority is: **Site > Git Repository > Store Link** -Please only use the store link if there's neither a site nor a Git repository available for the app/extension you'd like to submit. +> [!INFO] NOTE +> For bigger changes to the wiki, such as debloating efforts or the restructuring of a page/section, you must first discuss these with us via [Discord](https://rentry.co/fmhy-invite) before opening a [Pull Request](https://github.com/fmhy/edit/pulls). -3. Always check to see if the site you'd like to submit has a Discord / Telegram server you can link with it. +**Don't submit any of the following:** -4. Find a suitable category for the link and then submit it by making a **[Pull Request](https://github.com/fmhy/edit/pulls)**. +- **đŸ’°ī¸ Paid / Trial Sites** - We don't accept any paid or free trial only entries, with the exception of select paid [VPNs](/adblockvpnguide#vpn) and [Debrid](/downloadpiracyguide#leeches-debrid). +- **đŸ•šī¸ Emulators** - Already listed on the [Game Tech Wiki](https://emulation.gametechwiki.com/index.php/Main_Page). +- **🌐 Web Browsers** - Already listed on [Comparison and Index Sites](/internet-tools#browser-tools). However, we accept privacy-based ones as well as normal Android browsers. +- **đŸ”ģ Leeches** - Unless already listed on existing [Leech Lists](../downloadpiracyguide#leeches-debrid), don't submit these. +- **🐧 Linux Distros** - They're already on [DistroWatch](https://distrowatch.com/). +- **🌍 Non-english Software** - We don't add non-english software sites (APKs, games, torrents, etc.) unless they have a very good reputation. +- **đŸ—‚ī¸ Coding Libraries** - There's too many of them and there are better places to find them. +- **🎲 Mining / Betting Sites** - Don't submit anything related to betting, mining, BINs, CCs, etc. +- **🎮 Multiplayer Hacks** - Don't submit any hacks or exploits that give an unfair advantage in multiplayer games. +- **đŸ–Ĩī¸ Custom OS's** - We don't recommend people use these. -#### Don't Submit: +### Adding a Site -**đŸ•šī¸ Emulators**: -They're already on the **[Game Tech Wiki](https://emulation.gametechwiki.com/index.php/Main_Page)**. +For submitting new links, follow these steps: -**🌐 Normal Web Browsers** -They're already on the **[Browser Index](https://github.com/nerdyslacker/desktop-web-browsers)**, though we accept privacy-based ones. +- Make sure it's not already in the wiki. The easiest way to do this is to check our [Single Page](https://api.fmhy.net/single-page) using `ctrl+f`. +- Reach out via the feedback system, by opening an [Issue](https://github.com/fmhy/edit/issues), or join our [Discord](https://rentry.co/fmhy-invite). +- You can optionally include socials, tools, or any other additional info alongside the entry. +- Avoid opening pull requests. See [Link Testing](#link-testing) for more info. -**đŸ”ģ Leeches**: -They're already on the **[File Hosting Wiki](https://filehostlist.miraheze.org/wiki/Free_Premium_Leeches)**. +### Reporting a Site -**🐧 Distros**: -They're already on **[DistroWatch](https://distrowatch.com/)**. +> [!INFO] NOTE +> If it's urgent, you're allowed to request an invite via our feedback system. -**🎲 Mining / Betting Sites**: -Don't post anything related to betting, mining, BINs, CCs, etc. +For changes to existing entries, follow these steps: -**🎮 Multiplayer Game Hacks**: -Don't post any hacks/exploits that give unfair advantages in multiplayer games. +- Reach out via any of the available methods, including opening a [Pull Request](https://github.com/fmhy/edit/pulls). +- Feel free to leave contact info when using the feedback system, if needed. Only trusted staff can view this. +- If you'd like to report a site removal or star change, you must include details as to why your changes should be accepted. -**đŸ–Ĩī¸ Custom Operating Systems** -We don't recommend people use these. +### Link Testing -## Reporting a Site +All additions have to first go through our testing process on [Discord](https://rentry.co/fmhy-invite). -> [!TIP] -> If you want to make bigger changes to the wiki, such as debloating or restructuring a page/section, please discuss those changes with us via **[Discord](https://rentry.co/fmhy-invite)** before making a **[Pull Request](https://github.com/fmhy/edit/pulls)**. +You can help us test new sites to figure out their use-case, safety, and whether they'd be a good fit for the wiki. -You can do one of the following: +Keep in mind certain sites (such as piracy sites) require more testing/vetting before they can be added. -- Reach out via the feedback system on any page of our [Website](https://fmhy.net/), or on **[Discord](https://rentry.co/fmhy-invite)** if you'd like to discuss your report. +### Formatting Rules -- Open an **[Issue](https://github.com/fmhy/edit/issues)** or a **[Pull Request](https://github.com/fmhy/edit/pulls)** and don't forget to explain why you think the site(s) in question should be removed, unstarred, and/or changed. +The wiki will always have some variation either due to exceptions being made, the layout/structure, or the flexible nature of markdown itself. -## Making changes +For these reasons, there are too many conditions and nuances to satisfy to make an easy-to-follow guide. However, you can generally get an idea by looking at how existing links are structured. -> [!TIP] -> The easiest way is to join our [Discord](https://rentry.co/fmhy-invite) to submit sites or any changes. +If you're unsure, ask in the wiki channels on [Discord](https://rentry.co/fmhy-invite) and wait for a staff member to reply. -If you want to make changes with instant site feedback, or are simply going to work with the site, you can do so with these 3 ways: +## Making Changes -- [Using gitpod.io or GitHub Codespaces (recommended)](#using-gitpod-or-github-codespaces) -- [Using the GitHub editor](#using-the-github-editor) -- [Manually setting up a development environment](#manually-setting-up-a-development-environment) +Instructions on various ways to edit the wiki and preview changes. +### GitHub Editor -### Using Gitpod or GitHub Codespaces +You can use the build-in web editor in two ways: -You can use either [gitpod.io](https://gitpod.io/) or [GitHub Codespaces](https://github.com/features/codespaces) to edit the wiki. +1. Find the file you want to edit, look for the edit icon (of a pencil) and click on it, then make your changes. -Follow these steps: + ![Edit Button](https://files.catbox.moe/7w3hnm.png) -1. Fork the repository by clicking the "Fork" button in the top right corner. +2. When you're done, click "Commit Changes..." then "Propose changes". Optionally add a commit description. -2. Now, to make changes, you can either use gitpod.io or GitHub Codespaces. +3. You should now see a comparison page showing all your edits. Click "Create pull request", fill in the box describing your changes, then hit submit. -#### Gitpod.io +**OR** -Login to your Gitpod account and click on the "New Workspace" button. Then select your fork and you should be in your gitpod workspace. +1. Fork the repository by clicking the "Fork" button in the top right. -To close the workspace, click on the "Gitpod" button at the bottom left corner then type "Stop Workspace" and hit enter. +2. Navigate to your fork's homepage and press the `.` (period) key on your keyboard. This will open the repository in a VSCode-like environment on `github.dev`. + +3. Make your changes, then commit via the source control tab. + + ![Source Control](https://files.catbox.moe/pa571v.png) + +4. Back on your fork's homepage, click "Contribute" then "Open pull request". + +5. You should now see a comparison page showing all your edits. Click "Create pull request", fill in the box describing your changes, then hit submit. + +### Dev Environment + +If you're going to work on the site itself, or simply want to preview the site and any changes, you can do so by setting up a development environment. #### GitHub Codespaces -Click on the "Code" button on the top right corner of the page and select "Codespaces" from the dropdown menu. +This creates an environment in the browser [(with 60h/month free quota)](https://docs.github.com/en/billing/managing-billing-for-your-products/about-billing-for-github-codespaces#monthly-included-storage-and-core-hours-for-personal-accounts). To use Codespaces, follow these steps: -To close the workspace, click on the "Code" button at the top right corner then click on "Stop Codespace" and hit enter. +1. Fork the repository by clicking the "Fork" button in the top right. -### Using the GitHub editor +2. Navigate to your fork's homepage and click on the green "Code" button above your repository, open "Codespaces" tab and click "Create codespace". -1. Fork the repository by clicking the "Fork" button in the top right corner. You can open your repository in a VSCode-like environment by pressing `.` (dot) in your fork's homepage which will take you to `github.dev`. +3. You may have to wait ~5-10 minutes for the codespace to load. -2. Find the file you want to edit. Find the "Edit" icon (of a pencil) and click on it. -Select edit button and make your changes. -![Select edit button](https://i.imgur.com/lnQfeo3.png) + ![Codespace Status](https://files.catbox.moe/5bp38f.png) -3. Scroll down and select "Propose changes", and "Create Pull Request" on the next page, and don't forget to explain why you think the site(s) in question should be removed, unstarred, and/or changed. +4. Once it has loaded, run `pnpm i && pnpm docs:dev` to start the preview. Then when it appears, click "Open in Browser" in the bottom right. -![propose changes](https://i.imgur.com/IaSJvnO.png) -![create pull request](https://i.imgur.com/z5Za72l.png) +5. Make your changes and commit. -### Manually setting up a development environment +6. To shut it down, click the "Code" button again and look for the `...` dropdown next to your codespace, then click "Stop codespace". -#### Manual +#### Local Instance -1. Fork the repository by clicking the "Fork" button in the top right corner. +Making changes on a local repository may require a basic understanding of Git. You can find learning resources [here](/edupiracyguide#developer-learning). -2. Make sure you have [Node.js](https://nodejs.org/en/), [pnpm](https://pnpm.io/), [git](https://git-scm.com/), and [VSCode](https://code.visualstudio.com/) or any other editor installed. Alternatively, `pnpm` has `pnpm env` you can use to manage Node. - -3. Clone your forked repository to your local machine. - -4. Open the cloned repository in your editor of choice. Find the file you want to work on, make changes. - -5. Add your changes with git (`git add `) and commit (`git commit -m "commit message"`), then push them (`git push`). - -6. 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. - -#### Nix - -You can use [nix](https://nixos.org/) to set up a development environment, we have a [flake](https://nixos.wiki/wiki/Flakes) that setups `nodejs` and `pnpm`. - -1. Fork the repository by clicking the "Fork" button in the top right corner and clone your forked repository to your local machine. - -2. Run `nix flake update` to update the flake lock file. - -3. Run `nix develop` to enter the development environment. - -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 +More info on manual setup can be found [here](/other/selfhosting). \ No newline at end of file diff --git a/docs/other/selfhosting.md b/docs/other/selfhosting.md index af2dea4d0..301efe5e2 100644 --- a/docs/other/selfhosting.md +++ b/docs/other/selfhosting.md @@ -5,22 +5,17 @@ description: This guide will help you set up and run your own instance of FMHY l # Selfhosting -This guide will help you set up and run your own instance of FMHY locally. - :::warning Do note that you **must** differentiate your instance from the official site (fmhy.net) to avoid confusion. Steps to do so are given below. ::: -#### Prerequisites +This guide will help you set up and run your own instance of FMHY locally. ### Docker (Experimental) -You will need to install Docker and Docker Compose run your own instance of FMHY locally. +To run a local instance, you will need to install [Docker](https://docs.docker.com/get-docker/) and [Docker Compose](https://docs.docker.com/compose/install/). -- [Docker](https://docs.docker.com/get-docker/) -- [Docker Compose](https://docs.docker.com/compose/install/) - -After installing Docker and Docker Compose, run the following commands: +After installing both, run the following commands: ```bash git clone https://github.com/fmhy/edit.git @@ -28,13 +23,24 @@ cd edit sudo docker compose up --build ``` -It should take a few minutes to build the image and start the container, running at port 4173. +It might take a few minutes to build the image and start the container, running at port 4173. + +### Nix Flake + +You can use [nix](https://nixos.org/) to set up a development environment, we have a [flake](https://nixos.wiki/wiki/Flakes) that setups `nodejs` and `pnpm`. + +1. Fork the repository and clone it to your local machine with `git clone https://github.com/fmhy/edit.git`. +2. Run `nix flake update` to update the flake lock file. +3. Run `nix develop` to enter the development environment. +4. Make your changes. +5. Exit the development environment by running `exit`. ### Manually +You will need to install the following: - [Git](https://git-scm.com/downloads) -- [Node.js](https://nodejs.org/en/download/) - Use the latest available LTS, doesn't matter much -- [pnpm 9.12.2 or newer](https://pnpm.io/installation) +- [Node.js](https://nodejs.org/en/download/) - Use latest available LTS release. +- [pnpm 9.12.2+](https://pnpm.io/installation) #### Step 1: Clone the Repository @@ -68,7 +74,7 @@ The development server will start at `http://localhost:5173` by default. #### Step 4: Building for Production You will need to update: -- the `meta` constant in `docs/.vitepress/constants.ts` +- `meta`: Constant in `docs/.vitepress/constants.ts` - `name`: Name of your instance - `hostname`: Your domain - `description`: Description of your instance @@ -80,7 +86,6 @@ You will need to update: - `hero.name` - `hero.tagline` - To build the project for production: ```bash @@ -105,22 +110,24 @@ pnpm api:preview #### Step 6: Deploy -See the [VitePress deployment guide](https://vitepress.dev/guide/deploy) for more information. +See the [VitePress deployment guide](https://vitepress.dev/guide/deploy) for more info. #### Environment Variables -You may want to disable NSFW content (sidebar entry, page contents) and/or the API component for Feedback: +There are a few variables you can change if you wish to disable them: -- `FMHY_BUILD_NSFW` - Disables NSFW content (experimental) -- `FMHY_BUILD_API` - Disables the API component +- `FMHY_BUILD_NSFW` - NSFW sidebar entry (experimental) +- `FMHY_BUILD_API` - API component for feedback system. #### Troubleshooting 1. If you encounter Node.js version issues, ensure you're using Node.js 21+ -2. For pnpm-related issues, make sure you're using pnpm 9+ -3. Clear the cache if you encounter build issues: - ```bash - rm -rf docs/.vitepress/cache - rm -rf docs/.vitepress/dist - pnpm install - ``` +2. For pnpm-related issues, ensure you're using pnpm 9+ +3. If you encounter build issues, try clearing cache: + ```bash + # Linux + rm -rf docs/.vitepress/cache + + # PowerShell + rm -r -fo docs/.vitepress/cache + ``` \ No newline at end of file