diff --git a/package-lock.json b/package-lock.json index 386d72b..79370e2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -32,6 +32,7 @@ "react-icons": "^5.5.0", "react-markdown": "^10", "rehype-slug": "^6.0.0", + "remark-custom-header-id": "^1.0.0", "remark-gfm": "4.0.0", "rom-patcher-js": "github:Hackdex-App/RomPatcher.js", "schema-dts": "^1.1.5", @@ -6368,6 +6369,22 @@ "url": "https://opencollective.com/unified" } }, + "node_modules/remark-custom-header-id": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/remark-custom-header-id/-/remark-custom-header-id-1.0.0.tgz", + "integrity": "sha512-xs1MAgCg1HoiIfqSVV5BPydB4/sc1tT8OHDoqt8Lnf1JHPMUDVumY2Szm/P9MIxIzOT9+tu4IYJTql0vCzldoA==", + "license": "MIT", + "dependencies": { + "@types/unist": "^3.0.2", + "unist-util-visit": "^5.0.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/remark-gfm": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/remark-gfm/-/remark-gfm-4.0.0.tgz", diff --git a/package.json b/package.json index 273a67c..a233dce 100644 --- a/package.json +++ b/package.json @@ -33,6 +33,7 @@ "react-icons": "^5.5.0", "react-markdown": "^10", "rehype-slug": "^6.0.0", + "remark-custom-header-id": "^1.0.0", "remark-gfm": "4.0.0", "rom-patcher-js": "github:Hackdex-App/RomPatcher.js", "schema-dts": "^1.1.5", diff --git a/src/app/faq/entries.md b/src/app/faq/entries.md index 434ddf7..6f1f4fe 100644 --- a/src/app/faq/entries.md +++ b/src/app/faq/entries.md @@ -20,8 +20,13 @@ Browse the Discover page to find a ROM hack that interests you. Once you've sele ### Do I need an account to browse and download patches? No account is required to browse the Discover page and download ROM hacks. +### Why do I keep getting a _"Failed to fetch"_ error when trying to download a hack? {#failed-to-fetch-error} +Some users have reported issues with their Internet Service Provider (ISP) blocking the download. Check with your ISP to see if they are blocking the `patches.hackdex.app` or `images.hackdex.app` domains. If so, contact them to see if they can unblock the domains. Until then, try using your phone's data connection instead of Wi-Fi, or use a VPN to bypass the block. This will likely continue to be an issue until Hackdex increases in age and popularity. + +If the problem is not related to your ISP, try clearing your browser's cache and reloading the page or using a different browser or device. If the error persists, please contact us. + ### How do I find ROM hacks that interest me? -The Discover page features curated sections including "Most Popular," "Newest," and "Recently Updated" to help you find active and trending hacks quickly. You can also search or filter by tags, base ROM, and more. +The Discover page features curated sections including "Trending", "Most Popular," "Newest," and "Recently Updated" to help you find active and trending hacks quickly. You can also search or filter by tags, base ROM, and more. ### What types of ROM hacks are available? Hackdex is specifically focused on Pokémon ROM hack patches across different generations of Pokémon games. Creators must submit and upload their own ROM hacks. We do not steal the work of other creators without their explicit permission. @@ -37,19 +42,26 @@ The code is [fully open source](https://github.com/Hackdex-App/hackdex-website), These emulators are considered to be the most accurate to the original hardware and are recommended by most creators for the best experience. -#### GB, GBC, GBA +#### GB, GBC +| Platform | Emulator | +|----------|---------| +| Windows, macOS, Linux | [SameBoy](https://sameboy.github.io/) | +| Android | [RetroArch w/ SameBoy core](https://play.google.com/store/apps/details?id=com.retroarch) | +| iOS | [SameBoy](https://apps.apple.com/us/app/sameboy/id6496971295) | + +#### GBA | Platform | Emulator | |----------|---------| | Windows, macOS, Linux | [mGBA](https://mgba.io/) | -| Android | pizzaboy, Lemuroid, RetroArch w/ mGBA core | -| iOS | Ignited, RetroArch w/ mGBA core | +| Android | [Pizza Boy](https://play.google.com/store/apps/details?id=com.dothq.pizzaboy) \| [Lemuroid](https://play.google.com/store/apps/details?id=com.swordfish.lemuroid) \| [RetroArch w/ mGBA core](https://play.google.com/store/apps/details?id=com.retroarch) | +| iOS | [RetroArch w/ mGBA core](https://apps.apple.com/us/app/retroarch/id6499539433) \| [Manic EMU w/ mGBA core](https://apps.apple.com/us/app/manic-emu-game-emulator/id6743335790) | #### NDS | Platform | Emulator | |----------|---------| -| Desktop | [MelonDS](https://melonds.kuribo64.net/) | -| Android | RetroArch w/ MelonDS core | -| iOS | Delta, RetroArch w/ MelonDS core | +| Windows, macOS, Linux | [MelonDS](https://melonds.kuribo64.net/) | +| Android | [RetroArch w/ MelonDS core](https://play.google.com/store/apps/details?id=com.retroarch) | +| iOS | [Delta](https://apps.apple.com/us/app/delta-game-emulator/id1048524688) \| [RetroArch w/ MelonDS core](https://apps.apple.com/us/app/retroarch/id6499539433) \| [Manic EMU w/ MelonDS core](https://apps.apple.com/us/app/manic-emu-game-emulator/id6743335790) | --- @@ -69,11 +81,19 @@ A built-in patcher is also included in the submission form, so you also have the ### Why only BPS patch files? The BPS format is the successor to the IPS and UPS formats, with the added benefit of including hash checksums for verification. This helps ensure that the patch file is linked to the correct base ROM. An incorrect base ROM will result in a corrupted game. +There are also plans to add Xdelta support for NDS hacks in the future. + ### How does my hack gain visibility? We highly recommend linking to your romhack's Hackdex page from PokéCommunity, Reddit, or other social media platforms. Doing so can help boost your hack's visibility and outrank those sketchy ROM sharing sites that steal many creators' hard work. Once submitted on Hackdex, your hack can appear in the Discover page's curated sections, including "Newest" hacks for recent submissions and "Recently Updated" when you post updates. Popular hacks gain visibility in the "Most Popular" section based on number of downloads. +Here are some helpful tips for improving your hack's page to help increase visibility: +- Include at least 3 screenshots that help make your hack stand out, with the first one being the most eye-catching. +- Ensure your screenshots are taken using the emulator's built-in screenshot functionality (not your computer's screenshot/snipping tools!). + - GIF screenshots are supported! +- Use [Markdown formatting](https://github.com/adam-p/markdown-here/wiki/markdown-cheatsheet) for your description to make it more readable and visually appealing. + ### Can I update my romhack after submitting? Yes. Hackdex supports updates to submitted hacks, which will be reflected in the "Recently Updated" section of the Discover page, giving your hack renewed visibility. diff --git a/src/components/Markdown/Markdown.tsx b/src/components/Markdown/Markdown.tsx index e2885d9..14c5682 100644 --- a/src/components/Markdown/Markdown.tsx +++ b/src/components/Markdown/Markdown.tsx @@ -2,6 +2,8 @@ import ReactMarkdown from "react-markdown"; import remarkGfm from "remark-gfm"; import rehypeSlug from "rehype-slug"; import remarkSpoiler from "@/utils/markdown/remark-spoiler"; +import remarkCustomHeaderId from 'remark-custom-header-id'; +import { FiExternalLink } from "react-icons/fi"; import Spoiler from "./Spoiler"; interface MarkdownProps { @@ -25,7 +27,7 @@ export default function Markdown({ return ( {children}; }, + a: ({ node, children, className, ...props }: any) => { + // Add an external link icon if the link is external + if (props.href && !props.href.startsWith("/") && !props.href.startsWith("#") && !props.href.startsWith("https://www.hackdex.app")) { + return {children}; + } + // Default anchor rendering + return {children}; + }, }} > {children}