From 307996576dd9640523ca1017bd2c2b161069deea Mon Sep 17 00:00:00 2001 From: Christian Bartelius Date: Sun, 27 Oct 2019 13:09:41 +0100 Subject: [PATCH 1/2] Updated docs regarding wiki compression --- Docs/compress-wiki.md | 18 ++++++++++++++++++ Docs/configuration.md | 1 + README.md | 11 ++++++++++- Web/src/docs/metadata.json | 4 ++++ 4 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 Docs/compress-wiki.md diff --git a/Docs/compress-wiki.md b/Docs/compress-wiki.md new file mode 100644 index 000000000..27857143b --- /dev/null +++ b/Docs/compress-wiki.md @@ -0,0 +1,18 @@ +# Compress Wiki + +If your repository has a wiki with images, you can opt in to optimize these images as well as your code repo. + +By adding `compressWiki` in the `.imgbotconfig` file as displayed below, you will enable this feature. + +``` +{ + "schedule": "daily", // daily|weekly|monthly + "ignoredFiles": [ + "*.jpg", // ignore by extension + "image1.png", // ignore by filename + "public/special_images/*", // ignore by folderpath + ], + "aggressiveCompression": "true" // true|false + "compressWiki": "true" // true|false +} +``` \ No newline at end of file diff --git a/Docs/configuration.md b/Docs/configuration.md index c45257123..a7768d9df 100644 --- a/Docs/configuration.md +++ b/Docs/configuration.md @@ -15,6 +15,7 @@ Here is an example .imgbotconfig setup that shows some of the options. "public/special_images/*", // ignore by folderpath ], "aggressiveCompression": "true" // true|false + "compressWiki": "true" // true|false } ``` diff --git a/README.md b/README.md index 06a7367f1..0641d98bb 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,8 @@ This file should be placed in the root of the repository and set to your liking. "image1.png", // by filename "public/special_images/*", // by folderpath ], - "aggressiveCompression": true // true|false + "aggressiveCompression": "true", // true|false + "compressWiki": "true" // true|false } ``` @@ -49,6 +50,14 @@ to help@imgbot.net - Opt in to use lossy compression algorithms - The default behavior without this setting is lossless compression +**compressWiki** + +- optional +- Accepts: true|false +- Opt in to also compress wiki repo + - Example: `https://github.com/YOUR_USERNAME/YOUR_REPOSITORY.wiki.gi` +- The default behavior is opt out + Find out more: https://imgbot.net/docs ## Contributing diff --git a/Web/src/docs/metadata.json b/Web/src/docs/metadata.json index e33bae026..17766778e 100644 --- a/Web/src/docs/metadata.json +++ b/Web/src/docs/metadata.json @@ -27,6 +27,10 @@ "slug": "aggressive-compression", "title": "Aggressive compression" }, + { + "slug": "compress-wiki", + "title": "Compress wiki" + }, { "slug": "authorization", "title": "Authorization" From fa199f56e41545afb1b265b9b6fdda40a0e73e45 Mon Sep 17 00:00:00 2001 From: Christian Bartelius Date: Wed, 30 Oct 2019 20:56:52 +0100 Subject: [PATCH 2/2] Updated docs based on review --- Docs/compress-wiki.md | 2 ++ README.md | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Docs/compress-wiki.md b/Docs/compress-wiki.md index 27857143b..07d80d897 100644 --- a/Docs/compress-wiki.md +++ b/Docs/compress-wiki.md @@ -2,6 +2,8 @@ If your repository has a wiki with images, you can opt in to optimize these images as well as your code repo. +All of the images in the wiki will be updated directly on the default branch. This is due to the lack of branch management and no pull requests available within GitHub wikis. + By adding `compressWiki` in the `.imgbotconfig` file as displayed below, you will enable this feature. ``` diff --git a/README.md b/README.md index 0641d98bb..762151b37 100644 --- a/README.md +++ b/README.md @@ -55,7 +55,7 @@ to help@imgbot.net - optional - Accepts: true|false - Opt in to also compress wiki repo - - Example: `https://github.com/YOUR_USERNAME/YOUR_REPOSITORY.wiki.gi` + - Example: `https://github.com/YOUR_USERNAME/YOUR_REPOSITORY.wiki.git` - The default behavior is opt out Find out more: https://imgbot.net/docs