2024-01-26 20:01:40 +00:00
|
|
|
# These commands must be run from the VictoriaMetrics repository root
|
|
|
|
|
2023-11-22 16:22:41 +00:00
|
|
|
# run local server for documentation website at http://127.0.0.1:4000/
|
2022-05-17 12:06:58 +00:00
|
|
|
docs-up:
|
2023-04-24 11:38:00 +00:00
|
|
|
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 \
|
2023-11-22 16:22:41 +00:00
|
|
|
-v $(shell pwd)/docs:/srv/jekyll \
|
|
|
|
jekyll/jekyll:3.8 jekyll serve --livereload --incremental
|
2023-11-20 10:28:47 +00:00
|
|
|
|
2023-11-22 16:22:41 +00:00
|
|
|
# Converts images at docs folder to webp format
|
2023-11-20 10:52:09 +00:00
|
|
|
# See https://docs.victoriametrics.com/Single-server-VictoriaMetrics.html#images-in-documentation
|
2023-11-20 10:28:47 +00:00
|
|
|
docs-images-to-webp:
|
2023-11-22 16:22:41 +00:00
|
|
|
IMAGES_EXTENSION=jpg $(MAKE) docs-images-to-webp-by-extension
|
|
|
|
IMAGES_EXTENSION=jpeg $(MAKE) docs-images-to-webp-by-extension
|
|
|
|
IMAGES_EXTENSION=png $(MAKE) docs-images-to-webp-by-extension
|
2023-11-20 10:28:47 +00:00
|
|
|
|
2023-11-22 16:22:41 +00:00
|
|
|
docs-images-to-webp-by-extension:
|
|
|
|
docker run --rm -it \
|
|
|
|
-v $(shell pwd)/docs:/docs \
|
|
|
|
elswork/cwebp \
|
|
|
|
sh -c 'find /docs/ -type f ! -path "/docs/operator/*" ! -path "/docs/_site/*" -name "*.$(IMAGES_EXTENSION)" -print0 | \
|
|
|
|
xargs -0 -P $(MAKE_CONCURRENCY) -I {} sh -c '"'"'cwebp -preset drawing -m 6 -o "$${1%.*}.webp" $$1'"'"' _ {}'
|
|
|
|
find docs/ -type f ! -path 'docs/operator/*' ! -path 'docs/_site/*' -name '*.$(IMAGES_EXTENSION)' -print0 | xargs -0 rm -f
|