What is GHWSGI?

GHWSGI (Github Wiki Steamgifts Integration) is a simple userscript that allows you to view Github Wiki pages inside Steamgifts discussion topics as if they were written directly in Steamgifts.

Why?

There are some threads on Steamgifts that are used as a meeting point for bundles, tools and specific store's discounts among others, that are managed by a single person. This means that the person responsible for updating that thread has a ton of work to do and have to be editing it constantly. People come and go from steamgifts, and when a person managing one of these threads leave the site, another thread has to be created and maintained.

Wikis on the other hand are by nature collaborative. Github wiki allows the project creator to allow everybody to edit the wiki or only allow a handpicked group of people to do so. This leads to teamwork and faster updates on the threads, as a whole team (or the whole community) can update it.

Github Wikis are handled internally as a normal git repository, so this means we can have a full trace of what has been edited and by who and the owner has the ability to go back in versions if needed (we all know that trolls reign the internet).

Installation

You are by now probably well aware of how to install a userscript since Steamgifts it's full of awesome userscripts already but just to be safe, the installation process is the same as always:

  1. To install the script, you must install Greasemonkey, Tampermonkey, or some other userscript manager first.
  2. Once you have a userscript manager, click here and you should be prompted to install it.

For thread mantainers

It's hard to migrate a thread to a Wiki?

Steamgifts and Github Wikis uses the same system to write posts (markdown). Transition consist in a simple copy paste to a new github wiki page and everything will look the same as the original post in steamgifts, but in a collaborative wiki!
Then you just need to insert the link into the thread, that it's easy too, see section below.

How to insert a wiki page into my thread

If you are already using ESGST, there is a built-in option that does all the work for you, it'll just ask the url of the wiki page that you want to insert and will create all the code automatically.
If you cannot find the new button in the comment section icon-bar, you may have to enable this functionality in ESGST options. This will only be necessary if you don't have ESGST configured to auto enable all new features.

If you don't want to use ESGST and/or if you want to know exactly how it works from the inside, please keep reading the next section, where there is a detailed explanation on how to manually insert the codes to display the wiki page that you want.

How it actually work?

GHWSGI uses an invisible link with special format as an anchor for integrating the linked github wiki to your discussion thread. Since it's using an invisible link, you should warn people who doesn't have the script that this thread actually contains a wiki and link them to the real one if they don't want to use the script.

An example of how to use it using ASF wiki as an example would be:

This thread contains a Wiki visible with [GHWSGI userscript](https://www.steamgifts.com/discussion/fVwFM/). If you prefer to see it directly on GitHub instead [click here](https://www.github.com/JustArchi/ArchiSteamFarm/wiki/Configuration)
[](wiki-gh/JustArchi/ArchiSteamFarm/wiki/Configuration)

As you can see, there is a first section, where you tell the user that you are using a github wiki inside and redirect him to the userscript or the real wiki on github.

This thread contains a Wiki visible with [GHWSGI userscript](https://www.steamgifts.com/discussion/fVwFM/). If you prefer to see it directly on GitHub instead [click here](https://www.github.com/JustArchi/ArchiSteamFarm/wiki/Configuration)

Then there is the actual link that will trigger the userscript into integrating the GitHub wiki inside this thread.

[](wiki-gh/JustArchi/ArchiSteamFarm/wiki/Configuration)

Let's see what this messy link is constructed:

  1. The very beginning of the link is the trigger word for the userscript "wiki-gh"
  2. After that is the normal url to the wiki page that you want to link, without "https://www.github.com". In detail this means
    • Github username of the owner of the wiki
    • Github project name where the wiki resides
    • "wiki" string
    • Github wiki page that you want to display (this is optional if you want to display wiki's Home)

License

GHWSGI is released as a GPLv3 project. This means that everybody can look, fork and help in making this little project a better one.
If you are interested in contributing (please!), don't hesitate to check the repository and send some Pull Requests!
PS: I do hate javascript with passion, so feel free to improve the style/code and send a PR!


TL/DR: Install Userscript

3 weeks ago*

Comment has been collapsed.

Sign in through Steam to add a comment.