GMod Wiki Mirror
This project scrapes and mirrors the GMod Wiki.
It also includes a number of enhancments over the original.
You may use the public site, or even host your own for super fast offline access!
Features
- :dark_sunglasses: Custom Darkmode (Thanks @Be1zebub/@Phoenixf129!)
- Alternatively, this mirror plays nicely with DarkReader!
- :ship: Self-hosting with Docker
- :racing_car: Performance enhancements
- Significant performance improvements for CSS styling
- Reduced the total stylesheet size by nearly 90%
- Noticeable improvements to "Page-to-page" navigation speed
- Vastly improved navigation performance on Firefox
- :brain: Optimized memory usage
- Caches page content in browser cache rather than Javascript memory
- :mag_right: Fast searching
- Both basic and full-site searching are implemented
- Search results are not paginated
- :robot: Semantic search & MCP
- Hybrid keyword + semantic search, with an MCP server for AI tools
- :framed_picture: Optimized images
- Image size reduced by > 40% with only a small loss in quality
- :cloud: Hosted entirely on The Cloud
- Very reliable! Should almost never go down
- :robot: Automatic content updates
- :hammer_and_wrench: UI bug fixes
?format=json support
~pagelist support (json format only)
/gmod/ redirect support
- This means you can safely redirect all gmod links from
wiki.facepunch.com to gmodwiki.com
- "Copy markdown link" button (Thanks TankNut!)
- Keyboard navigation/highlighting support for the sidebar
- All external links open in a new tab
Limitations
Current limitations:
- No Editing (will not implement)
- No change history (probably won't implement)
- Most images are mirrored into the
.webp format, which has somewhat limited browser support. An image keeps its original format when that file is smaller
- The main page script.js is self-hosted and modified (for performance), meaning any useful updates will need to be manually backported
Self-Hosting
A docker image is provided to support self-hosting use cases.
The image is about 230mb, making it reasonably portable and quick to download 👍
Running the Docker image
First, be sure you have Docker installed.
With docker run
Run the wiki in the background:
docker run --name gmodwiki -p 127.0.0.1:4321:4321 --rm -d ghcr.io/cfc-servers/gmodwiki:latest
Then visit http://localhost:4321 in your browser.
Stopping the background container:
docker stop --time 1 gmodwiki
Useful if you want to leave the site running at all times
:point_up_2: Instructions
Download the docker-compose.yml file from this repository and put it somewhere on your machine.
Then, simply docker compose up (or docker-compose up for older docker engines).
You can easily configure the Host and Port when using docker compose.
First, create a .env file in the same directory as the docker-compose.yml, in the format of:
GMODWIKI_HOST=127.0.0.1
GMODWIKI_PORT=4321
Then you can change the Host or Port in that file, and then run docker compose up again.
If you want to expose the wiki instance to the world (not recommended without a reverse proxy like Nginx, and especially not without Cloudflare):
- Set
GMODWIKI_HOST=0.0.0.0
- Forward your chosen port (
4321 by default) in your router/firewall
- Visit your public IP in your browser:
http://<your IP>:<your port>
- If link previews show the wrong address, set
PUBLIC_ORIGIN to your public URL (for example PUBLIC_ORIGIN=https://wiki.example.org)
Hosting your own public instance
If you want to run another global instance for redundancy / host your own version
:point_up_2: Instructions
This mirror is made to run on Cloudflare. Deploying is really easy, simply clone the project and run:
npm i;
npm run build;
npm run pages:deploy;
Follow the auth/setup prompts from wrangler.