@@ -16,7 +16,7 @@ PAPEROPT_letter = -D latex_paper_size=letter
1616ALLSPHINXOPTS = -d $(BUILDDIR ) /doctrees $(PAPEROPT_$(PAPER ) ) $(SPHINXOPTS ) .
1717# the i18n builder cannot share the environment and doctrees with the others
1818I18NSPHINXOPTS = $(PAPEROPT_$(PAPER ) ) $(SPHINXOPTS ) .
19-
19+ VALEFILES := $( shell find -L $( DOCS_DIR ) -type d \( -path $( DOCS_DIR ) /plone.restapi/lib/ * -o -path $( DOCS_DIR ) "/plone.restapi/performance/ * " \) -prune -false -o -type f -name "*.md" -print)
2020
2121# Add the following 'help' target to your Makefile
2222# And add help text after each target name starting with '\#\#'
@@ -36,7 +36,7 @@ distclean: ## Clean docs build directory and Python virtual environment
3636
3737bin/python :
3838 python3 -m venv . || virtualenv --clear --python=python3 .
39- bin/python -m pip install --upgrade pip
39+ bin/pip install -r requirements-initial.txt
4040 bin/pip install -r requirements.txt
4141
4242docs/plone.api :
@@ -189,17 +189,17 @@ linkcheck: deps ## Run linkcheck
189189
190190.PHONY : linkcheckbroken
191191linkcheckbroken : deps # # Run linkcheck and show only broken links
192- cd $(DOCS_DIR ) && $(SPHINXBUILD ) -b linkcheck $(ALLSPHINXOPTS ) $(BUILDDIR ) /linkcheck | GREP_COLORS=' 0;31' grep -wi " broken\|redirect" --color=auto || test $$? = 1
192+ cd $(DOCS_DIR ) && $(SPHINXBUILD ) -b linkcheck $(ALLSPHINXOPTS ) $(BUILDDIR ) /linkcheck | GREP_COLORS=' 0;31' grep -wi " broken\|redirect" --color=always | GREP_COLORS= ' 0;31 ' grep -vi " https://github.com/plone/volto/issues/ " --color=always && if test $$ ? = 0 ; then exit 1 ; fi || test $$? = 1
193193 @echo
194194 @echo " Link check complete; look for any errors in the above output " \
195195 " or in $( BUILDDIR) /linkcheck/ ."
196196
197- .PHONY : spellcheck
198- spellcheck : deps # # Run spellcheck
199- cd $(DOCS_DIR ) && LANGUAGE=$* $(SPHINXBUILD ) -b spelling -j 4 $(ALLSPHINXOPTS ) $(BUILDDIR ) /spellcheck/$*
197+ .PHONY : vale
198+ vale : deps # # Run Vale style, grammar, and spell checks
199+ vale sync
200+ vale --no-wrap $(VALEFILES )
200201 @echo
201- @echo " Spellcheck is finished; look for any errors in the above output " \
202- " or in $( BUILDDIR) /spellcheck/ ."
202+ @echo " Vale is finished; look for any errors in the above output."
203203
204204.PHONY : html_meta
205205html_meta : deps # # Add meta data headers to all Markdown pages
@@ -212,7 +212,7 @@ doctest: deps
212212 " results in $( BUILDDIR) /doctest/output.txt."
213213
214214.PHONY : test
215- test : clean linkcheckbroken spellcheck # # Clean docs build, then run linkcheckbroken, spellcheck
215+ test : clean linkcheckbroken # # Clean docs build, then run linkcheckbroken
216216
217217.PHONY : deploy
218218deploy : clean html
@@ -226,6 +226,7 @@ livehtml: deps ## Rebuild Sphinx documentation on changes, with live-reload in
226226
227227.PHONY : netlify
228228netlify :
229+ pip install -r requirements-initial.txt
229230 pip install -r requirements.txt
230231 pip install -r requirements-netlify.txt
231232 git submodule init; \
@@ -241,4 +242,4 @@ storybook:
241242 cd submodules/volto && yarn && yarn build-storybook -o ../../_build/html/storybook
242243
243244.PHONY : all
244- all : clean spellcheck linkcheck html # # Clean docs build, then run linkcheck and spellcheck , and build html
245+ all : clean vale linkcheck html # # Clean docs build, then run vale and linkcheck , and build html
0 commit comments