mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2025-03-11 15:34:56 +00:00
docs: follow-up after d3f919df3e
d3f919df3e
Signed-off-by: hagen1778 <roman@victoriametrics.com> (cherry picked from commit3ffa8975d4
) Signed-off-by: hagen1778 <roman@victoriametrics.com>
This commit is contained in:
parent
2362af3b0c
commit
6575d646c0
3 changed files with 42 additions and 5 deletions
|
@ -2,7 +2,7 @@ docs-install:
|
|||
gem install jekyll bundler
|
||||
bundle install --gemfile=Gemfile
|
||||
|
||||
# To run localy you need to use ruby version =< 2.7.6, but not >=3.x , see https://bbs.archlinux.org/viewtopic.php?pid=1976408#p1976408
|
||||
# To run locally you need to use ruby version =< 2.7.6, but not >=3.x , see https://bbs.archlinux.org/viewtopic.php?pid=1976408#p1976408
|
||||
#
|
||||
# run local server for documentation website
|
||||
# at http://127.0.0.1:4000/
|
||||
|
@ -21,6 +21,9 @@ docs-up-docker:
|
|||
-v $(PWD):/srv/jekyll \
|
||||
jekyll/jekyll:3.8 jekyll serve --livereload
|
||||
|
||||
# Converts $IMAGES_EXTENSION in the specified $PATH_TO_IMAGES
|
||||
# to webp format with $IMAGE_QUALITY (0:small..100:big)
|
||||
# See https://docs.victoriametrics.com/Single-server-VictoriaMetrics.html#images-in-documentation
|
||||
docs-images-to-webp:
|
||||
docker run -it --rm -v \
|
||||
$(PWD)/$(PATH_TO_IMAGES):/data \
|
||||
|
@ -29,7 +32,3 @@ docs-images-to-webp:
|
|||
|
||||
docs-remove-old-images:
|
||||
rm -f $(PWD)/$(PATH_TO_IMAGES)/*.$(IMAGES_EXTENSION)
|
||||
|
||||
docs-change-images: \
|
||||
docs-images-to-webp \
|
||||
docs-remove-old-images
|
||||
|
|
|
@ -2497,6 +2497,25 @@ Adhering `KISS` principle simplifies the resulting code and architecture, so it
|
|||
|
||||
Report bugs and propose new features [here](https://github.com/VictoriaMetrics/VictoriaMetrics/issues).
|
||||
|
||||
## Images in documentation
|
||||
|
||||
Please, keep image size and number of images per single page low. Keep the docs page as lightweight as possible.
|
||||
|
||||
If the page needs to have many images, consider using WEB-optimized image format [webp](https://developers.google.com/speed/webp).
|
||||
When adding a new doc with many images use `webp` format right away. Or use a MAKEFILE command below to
|
||||
convert already existing images automatically:
|
||||
```console
|
||||
PATH_TO_IMAGES=path/to/images IMAGES_EXTENSION={png|jpg|jpeg} IMAGE_QUALITY=0..100 make docs-images-to-webp
|
||||
```
|
||||
|
||||
_// For this command to work ensure you run it when in `docs` dir (`cd docs`) and have Docker up&running._
|
||||
|
||||
Once conversion is done, update the path to images in your docs and verify everything is correct.
|
||||
When you're happy with result - remove the originals with the following command:
|
||||
```console
|
||||
PATH_TO_IMAGES=path/to/images IMAGES_EXTENSION={png|jpg|jpeg} make docs-remove-old-images
|
||||
```
|
||||
|
||||
## VictoriaMetrics Logo
|
||||
|
||||
[Zip](https://github.com/VictoriaMetrics/VictoriaMetrics/blob/master/VM_logo.zip) contains three folders with different image orientations (main color and inverted version).
|
||||
|
|
|
@ -2505,6 +2505,25 @@ Adhering `KISS` principle simplifies the resulting code and architecture, so it
|
|||
|
||||
Report bugs and propose new features [here](https://github.com/VictoriaMetrics/VictoriaMetrics/issues).
|
||||
|
||||
## Images in documentation
|
||||
|
||||
Please, keep image size and number of images per single page low. Keep the docs page as lightweight as possible.
|
||||
|
||||
If the page needs to have many images, consider using WEB-optimized image format [webp](https://developers.google.com/speed/webp).
|
||||
When adding a new doc with many images use `webp` format right away. Or use a MAKEFILE command below to
|
||||
convert already existing images automatically:
|
||||
```console
|
||||
PATH_TO_IMAGES=path/to/images IMAGES_EXTENSION={png|jpg|jpeg} IMAGE_QUALITY=0..100 make docs-images-to-webp
|
||||
```
|
||||
|
||||
_// For this command to work ensure you run it when in `docs` dir (`cd docs`) and have Docker up&running._
|
||||
|
||||
Once conversion is done, update the path to images in your docs and verify everything is correct.
|
||||
When you're happy with result - remove the originals with the following command:
|
||||
```console
|
||||
PATH_TO_IMAGES=path/to/images IMAGES_EXTENSION={png|jpg|jpeg} make docs-remove-old-images
|
||||
```
|
||||
|
||||
## VictoriaMetrics Logo
|
||||
|
||||
[Zip](https://github.com/VictoriaMetrics/VictoriaMetrics/blob/master/VM_logo.zip) contains three folders with different image orientations (main color and inverted version).
|
||||
|
|
Loading…
Reference in a new issue