Update 'README.md' (#94)

1. Simplify GreaseMonkey link code - fixes https://codeberg.org/video-prize-ranch/rimgo/issues/93
2. Add `bash` syntax highlighting to code blocks.

Reviewed-on: https://codeberg.org/video-prize-ranch/rimgo/pulls/94
Co-authored-by: HexagonCDN <hexagoncdn@noreply.codeberg.org>
Co-committed-by: HexagonCDN <hexagoncdn@noreply.codeberg.org>
This commit is contained in:
HexagonCDN 2023-03-08 00:23:53 +00:00 committed by video-prize-ranch
parent 2c88b519c9
commit 39c670c81f
1 changed files with 9 additions and 9 deletions

View File

@ -122,7 +122,7 @@ Use [LibRedirect](https://github.com/libredirect/libredirect) to automatically r
### GreaseMonkey script ### GreaseMonkey script
There is a script to redirect Imgur links to rimgo. There is a script to redirect Imgur links to rimgo.
[https://codeberg.org/zortazert/GreaseMonkey-Redirect/src/branch/main/imgur-to-rimgo.user.js](https://codeberg.org/zortazert/GreaseMonkey-Redirect/src/branch/main/imgur-to-rimgo.user.js) https://codeberg.org/zortazert/GreaseMonkey-Redirect/src/branch/main/imgur-to-rimgo.user.js
### Redirector ### Redirector
You can use the [Redirector](https://github.com/einaregilsson/Redirector) extension to redirect Imgur links to rimgo with the configuration below: You can use the [Redirector](https://github.com/einaregilsson/Redirector) extension to redirect Imgur links to rimgo with the configuration below:
@ -154,18 +154,18 @@ rimgo can run on any platform Go compiles on.
### Docker (recommended) ### Docker (recommended)
Install [Docker](https://docs.docker.com/engine/install/) and [docker-compose](https://docs.docker.com/compose/install/), then clone this repository. Install [Docker](https://docs.docker.com/engine/install/) and [docker-compose](https://docs.docker.com/compose/install/), then clone this repository.
``` ```bash
git clone https://codeberg.org/video-prize-ranch/rimgo git clone https://codeberg.org/video-prize-ranch/rimgo
cd rimgo cd rimgo
``` ```
Edit the `docker-compose.yml` file using your favorite text editor. Edit the `docker-compose.yml` file using your favorite text editor.
``` ```bash
nvim docker-compose.yml nvim docker-compose.yml
``` ```
You can now run rimgo. You can now run rimgo.
``` ```bash
sudo docker-compose up -d sudo docker-compose up -d
``` ```
@ -188,28 +188,28 @@ services:
* Go v1.16 or later * Go v1.16 or later
Clone the repository and `cd` into it. Clone the repository and `cd` into it.
``` ```bash
git clone https://codeberg.org/video-prize-ranch/rimgo git clone https://codeberg.org/video-prize-ranch/rimgo
cd rimgo cd rimgo
``` ```
Build rimgo. Build rimgo.
``` ```bash
go build go build
``` ```
You can now run rimgo. You can now run rimgo.
``` ```bash
./rimgo ./rimgo
``` ```
To include version information use: To include version information use:
``` ```bash
go build -ldflags "-X codeberg.org/video-prize-ranch/rimgo/pages.VersionInfo=$(date '+%Y-%m-%d')-$(git rev-list --abbrev-commit -1 HEAD)" go build -ldflags "-X codeberg.org/video-prize-ranch/rimgo/pages.VersionInfo=$(date '+%Y-%m-%d')-$(git rev-list --abbrev-commit -1 HEAD)"
``` ```
(optional) You can use a .env file to set environment variables for configuration. (optional) You can use a .env file to set environment variables for configuration.
``` ```bash
cp .env.example .env cp .env.example .env
nvim .env nvim .env
``` ```