dcavalca / centos / centos.org

Forked from centos/centos.org a month ago
Clone
Blob Blame History Raw
all:

site-l10n:
	podman run --rm \
		--name $@ \
		-v $$PWD/:/site:z \
		--env JEKYLL_SOURCE_DIR=/site \
		--env JEKYLL__site_DIR=/site/_site \
		registry.gitlab.com/centos/artwork/centos-web/templates/jekyll-site-l10n:latest \
		/usr/local/bin/page-locale.sh

.PHONY: site-server
site-server: clean
	install -d _site
	podman run --rm -d \
		--name jekyll-theme-centos-$@ \
		-v $$PWD/:/site:z \
		-p 0.0.0.0:4000:4000 \
		registry.gitlab.com/centos/artwork/centos-web/jekyll-theme-centos:latest \
		bundle exec jekyll serve -H 0.0.0.0 -p 4000 --config /site/_config.yml -s /site -d /site/_site

.PHONY: site
site: clean
	install -d _site
	podman run --rm -d \
		--name jekyll-theme-centos-$@ \
		-v $$PWD/:/site:z \
		registry.gitlab.com/centos/artwork/centos-web/jekyll-theme-centos:latest \
		bundle exec jekyll build --config /site/_config.yml -s /site -d /site/_site

site-html-prettier: site
	podman run --rm \
		--name $@ \
		-v $$PWD/_site:/_site:z \
		registry.gitlab.com/centos/artwork/centos-web/pipelines/toolbox/npm-prettier:latest \
		npx prettier --ignore-path /srv/toolbox/npm-prettier/.prettierignore -w "/_site/**/*.html"

site-html-validate: site-html-prettier
	podman run --rm \
		--name $@ \
		-v $$PWD/_site:/_site:z \
		registry.gitlab.com/centos/artwork/centos-web/pipelines/toolbox/npm-htmlvalidate:latest \
		npx html-validate --config=/srv/toolbox/npm-htmlvalidate/.htmlvalidate.json /_site

.PHONY: clean
clean:
	$(RM) -r _site