2022-05-17 14:06:58 +02:00
|
|
|
docs-install:
|
|
|
|
gem install jekyll bundler
|
|
|
|
bundle install --gemfile=Gemfile
|
2022-10-25 16:53:24 +02:00
|
|
|
|
2023-11-20 11:52:09 +01:00
|
|
|
# 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
|
2022-10-25 15:02:14 +02:00
|
|
|
#
|
2022-05-17 14:06:58 +02:00
|
|
|
# run local server for documentation website
|
|
|
|
# at http://127.0.0.1:4000/
|
|
|
|
# On first use, please run `make docs-install`
|
|
|
|
docs-up:
|
2022-10-25 16:53:24 +02:00
|
|
|
JEKYLL_GITHUB_TOKEN=blank PAGES_API_URL=http://0.0.0.0 bundle exec \
|
|
|
|
--gemfile=Gemfile \
|
|
|
|
jekyll server --livereload
|
2023-04-24 13:38:00 +02:00
|
|
|
|
|
|
|
docs-up-docker:
|
|
|
|
docker run --rm -it \
|
|
|
|
-e JEKYLL_GITHUB_TOKEN=blank \
|
|
|
|
-e PAGES_API_URL=http://0.0.0.0 \
|
|
|
|
-e PAGES_REPO_NWO=VictoriaMetrics/VictoriaMetrics \
|
|
|
|
-p 4000:4000 \
|
|
|
|
-v $(PWD):/srv/jekyll \
|
|
|
|
jekyll/jekyll:3.8 jekyll serve --livereload
|
2023-11-20 11:28:47 +01:00
|
|
|
|
2023-11-20 11:52:09 +01:00
|
|
|
# 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
|
2023-11-20 11:28:47 +01:00
|
|
|
docs-images-to-webp:
|
|
|
|
docker run -it --rm -v \
|
|
|
|
$(PWD)/$(PATH_TO_IMAGES):/data \
|
|
|
|
elswork/cwebp \
|
|
|
|
find ./ -type f -name '*.$(IMAGES_EXTENSION)' -exec sh -c 'cwebp -q ${IMAGE_QUALITY} -m 6 $$1 -o "$${1%.png}.webp"' _ {} \;
|
|
|
|
|
|
|
|
docs-remove-old-images:
|
|
|
|
rm -f $(PWD)/$(PATH_TO_IMAGES)/*.$(IMAGES_EXTENSION)
|