|
@@ -74,6 +74,31 @@ stop: ## Stop FreshRSS container if any
|
|
|
$(DOCKER) stop freshrss-dev || true
|
|
$(DOCKER) stop freshrss-dev || true
|
|
|
$(DOCKER) network rm $(NETWORK) || true
|
|
$(DOCKER) network rm $(NETWORK) || true
|
|
|
|
|
|
|
|
|
|
+##@ Documentation
|
|
|
|
|
+
|
|
|
|
|
+DOCS_HOST ?= 127.0.0.1
|
|
|
|
|
+DOCS_PORT ?= 4000
|
|
|
|
|
+
|
|
|
|
|
+define prepare_docs
|
|
|
|
|
+ cd docs && \
|
|
|
|
|
+ export BUNDLE_FROZEN=true && $(if , Always respect Gemfile.lock ) \
|
|
|
|
|
+ export BUNDLE_PATH=.bundle && $(if , Specify repo-local path to run without root ) \
|
|
|
|
|
+ (bundle check || bundle install)
|
|
|
|
|
+endef
|
|
|
|
|
+
|
|
|
|
|
+.PHONY: build-docs
|
|
|
|
|
+build-docs: ## Test building Jekyll documentation
|
|
|
|
|
+ $(prepare_docs) && bundle exec jekyll build
|
|
|
|
|
+
|
|
|
|
|
+# Example usage: `make serve-docs DOCS_HOST=0.0.0.0 DOCS_PORT=8080`
|
|
|
|
|
+.PHONY: serve-docs
|
|
|
|
|
+serve-docs: ## Run local server for serving docs
|
|
|
|
|
+ $(prepare_docs) && bundle exec jekyll serve -H $(DOCS_HOST) -P $(DOCS_PORT) --watch --incremental
|
|
|
|
|
+
|
|
|
|
|
+.PHONY: clean-docs
|
|
|
|
|
+clean-docs: ## Clean up generated Jekyll files
|
|
|
|
|
+ rm -rf docs/_site docs/.jekyll-cache # Without removing installed bundles
|
|
|
|
|
+
|
|
|
##@ Tests and linter
|
|
##@ Tests and linter
|
|
|
.PHONY: lint
|
|
.PHONY: lint
|
|
|
lint: bin/phpcs ## Run the linter on PHP files
|
|
lint: bin/phpcs ## Run the linter on PHP files
|