@@ -30,162 +30,183 @@ clean: ## Clean docs build directory
3030 cd $(DOCS_DIR ) && rm -rf $(BUILDDIR ) /
3131
3232.PHONY : distclean
33- distclean : clean # # Clean docs build directory, Python virtual environment, and symlinks
33+ distclean : clean # # Clean Python virtual environment and symlinks to submodules
3434 rm -rf venv
3535 rm docs/plone.api
3636 rm docs/plone.restapi
3737 rm docs/volto
38+ @echo " Cleaned Python virtual environment and symlinks to submodules."
3839 @echo
39- @echo " Cleaned docs build directory, Python virtual environment, and symlinks."
4040
4141venv/bin/python : # # Setup up Python virtual environment and install requirements
4242 python3 -m venv venv
4343 venv/bin/pip install -r requirements-initial.txt
4444 venv/bin/pip install -r requirements.txt
45- @echo
4645 @echo " Installation of requirements completed."
46+ @echo
4747
4848docs/plone.api : # # Setup plone.api docs
4949 git submodule init
5050 git submodule update
51- venv/bin/pip install -e submodules/plone.api/" [test]"
5251 ln -s ../submodules/plone.api/docs ./docs/plone.api
53- @echo
5452 @echo " Documentation of plone.api initialized."
53+ @echo
54+
55+ venv/plone.api-install : docs/plone.api
56+ touch venv/plone.api-install
57+ venv/bin/pip install plone.api -c submodules/plone.api/constraints.txt
58+ venv/bin/pip install --no-deps -e submodules/plone.api/" [test]"
59+ @echo " plone.api installed."
60+ @echo
5561
5662docs/plone.restapi : # # Setup plone.restapi docs
5763 git submodule init
5864 git submodule update
5965 ln -s ../submodules/plone.restapi ./docs/plone.restapi
60- @echo
6166 @echo " Documentation of plone.restapi initialized."
67+ @echo
6268
6369docs/volto : # # Setup Volto docs
6470 git submodule init
6571 git submodule update
6672 ln -s ../submodules/volto/docs/source ./docs/volto
67- @echo
6873 @echo " Documentation of volto initialized."
74+ @echo
6975
70- .PHONY : deps
71- deps : venv/bin/python docs/volto docs/plone.restapi docs/plone.api # # Create Python virtual environment, install requirements, initialize or update the volto, plone.restapi, and plone.api submodules, and finally create symlinks to the source files.
76+ ln-seven : # # Toggle the symlink to Seven
77+ rm docs/volto
78+ ln -s ../submodules/volto/docs ./docs/volto
79+ @echo " Symlink to Volto changed to Seven."
80+ @echo
7281
82+ ln-volto : # # Toggle the symlink to Volto
83+ rm docs/volto
84+ ln -s ../submodules/volto/docs/source ./docs/volto
85+ @echo " Symlink to Seven changed to Volto."
86+ @echo
87+
88+ .PHONY : deps
89+ deps : venv/bin/python docs/volto docs/plone.restapi venv/plone.api-install # # Create Python virtual environment, install requirements, initialize or update the volto, plone.restapi, and plone.api submodules, create symlinks to the source files, and finally install plone.api.
7390
7491.PHONY : html
7592html : deps # # Build html
7693 cd $(DOCS_DIR ) && $(SPHINXBUILD ) -b html $(ALLSPHINXOPTS ) $(BUILDDIR ) /html
77- @echo
7894 @echo " Build finished. The HTML pages are in $( BUILDDIR) /html."
95+ @echo
7996
8097.PHONY : manual
8198manual : deps
8299 cd $(DOCS_DIR ) && $(SPHINXBUILD ) -b html -t manual . $(BUILDDIR ) /manual
100+ @echo " Build finished. The manual pages are in $( BUILDDIR) /manual."
101+ @echo
83102
84103.PHONY : dirhtml
85104dirhtml : deps
86105 cd $(DOCS_DIR ) && $(SPHINXBUILD ) -b dirhtml $(ALLSPHINXOPTS ) $(BUILDDIR ) /dirhtml
87- @echo
88106 @echo " Build finished. The HTML pages are in $( BUILDDIR) /dirhtml."
107+ @echo
89108
90109.PHONY : singlehtml
91110singlehtml : deps
92111 cd $(DOCS_DIR ) && $(SPHINXBUILD ) -b singlehtml $(ALLSPHINXOPTS ) $(BUILDDIR ) /singlehtml
93- @echo
94112 @echo " Build finished. The HTML page is in $( BUILDDIR) /singlehtml."
113+ @echo
95114
96115.PHONY : pickle
97116pickle : deps
98117 cd $(DOCS_DIR ) && $(SPHINXBUILD ) -b pickle $(ALLSPHINXOPTS ) $(BUILDDIR ) /pickle
99- @echo
100118 @echo " Build finished; now you can process the pickle files."
119+ @echo
101120
102121.PHONY : json
103122json : deps
104123 cd $(DOCS_DIR ) && $(SPHINXBUILD ) -b json $(ALLSPHINXOPTS ) $(BUILDDIR ) /json
105- @echo
106124 @echo " Build finished; now you can process the JSON files."
125+ @echo
107126
108127.PHONY : htmlhelp
109128htmlhelp : deps
110129 cd $(DOCS_DIR ) && $(SPHINXBUILD ) -b htmlhelp $(ALLSPHINXOPTS ) $(BUILDDIR ) /htmlhelp
111- @echo
112130 @echo " Build finished; now you can run HTML Help Workshop with the" \
113131 " .hhp project file in $( BUILDDIR) /htmlhelp."
132+ @echo
114133
115134.PHONY : epub
116135epub : deps
117136 cd $(DOCS_DIR ) && $(SPHINXBUILD ) -b epub $(ALLSPHINXOPTS ) $(BUILDDIR ) /epub
118- @echo
119137 @echo " Build finished. The epub file is in $( BUILDDIR) /epub."
138+ @echo
120139
121140.PHONY : latex
122141latex : deps
123142 cd $(DOCS_DIR ) && $(SPHINXBUILD ) -b latex $(ALLSPHINXOPTS ) $(BUILDDIR ) /latex
124- @echo
125143 @echo " Build finished; the LaTeX files are in $( BUILDDIR) /latex."
126144 @echo " Run \` make' in that directory to run these through (pdf)latex" \
127145 " (use \` make latexpdf' here to do that automatically)."
146+ @echo
128147
129148.PHONY : latexpdf
130149latexpdf : deps
131150 cd $(DOCS_DIR ) && $(SPHINXBUILD ) -b latex $(ALLSPHINXOPTS ) $(BUILDDIR ) /latex
132151 @echo " Running LaTeX files through pdflatex..."
133152 $(MAKE ) -C $(BUILDDIR ) /latex all-pdf
134153 @echo " pdflatex finished; the PDF files are in $( BUILDDIR) /latex."
154+ @echo
135155
136156.PHONY : text
137157text : deps
138158 cd $(DOCS_DIR ) && $(SPHINXBUILD ) -b text $(ALLSPHINXOPTS ) $(BUILDDIR ) /text
139- @echo
140159 @echo " Build finished. The text files are in $( BUILDDIR) /text."
160+ @echo
141161
142162.PHONY : man
143163man : deps
144164 cd $(DOCS_DIR ) && $(SPHINXBUILD ) -b man $(ALLSPHINXOPTS ) $(BUILDDIR ) /man
145- @echo
146165 @echo " Build finished. The manual pages are in $( BUILDDIR) /man."
166+ @echo
147167
148168.PHONY : texinfo
149169texinfo : deps
150170 cd $(DOCS_DIR ) && $(SPHINXBUILD ) -b texinfo $(ALLSPHINXOPTS ) $(BUILDDIR ) /texinfo
151- @echo
152171 @echo " Build finished. The Texinfo files are in $( BUILDDIR) /texinfo."
153172 @echo " Run \` make' in that directory to run these through makeinfo" \
154173 " (use \` make info' here to do that automatically)."
174+ @echo
155175
156176.PHONY : info
157177info : deps
158178 cd $(DOCS_DIR ) && $(SPHINXBUILD ) -b texinfo $(ALLSPHINXOPTS ) $(BUILDDIR ) /texinfo
159179 @echo " Running Texinfo files through makeinfo..."
160180 make -C $(BUILDDIR ) /texinfo info
161181 @echo " makeinfo finished; the Info files are in $( BUILDDIR) /texinfo."
182+ @echo
162183
163184.PHONY : changes
164185changes : deps
165186 cd $(DOCS_DIR ) && $(SPHINXBUILD ) -b changes $(ALLSPHINXOPTS ) $(BUILDDIR ) /changes
166- @echo
167187 @echo " The overview file is in $( BUILDDIR) /changes."
188+ @echo
168189
169190.PHONY : linkcheck
170191linkcheck : deps # # Run linkcheck
171192 cd $(DOCS_DIR ) && $(SPHINXBUILD ) -b linkcheck $(ALLSPHINXOPTS ) $(BUILDDIR ) /linkcheck
172- @echo
173193 @echo " Link check complete; look for any errors in the above output " \
174194 " or in $( BUILDDIR) /linkcheck/ ."
195+ @echo
175196
176197.PHONY : linkcheckbroken
177198linkcheckbroken : deps # # Run linkcheck and show only broken links
178199 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
179- @echo
180200 @echo " Link check complete; look for any errors in the above output " \
181201 " or in $( BUILDDIR) /linkcheck/ ."
202+ @echo
182203
183204.PHONY : vale
184205vale : deps # # Run Vale style, grammar, and spell checks
185206 venv/bin/vale sync
186207 venv/bin/vale --no-wrap $(VALEOPTS ) $(VALEFILES )
187- @echo
188208 @echo " Vale is finished; look for any errors in the above output."
209+ @echo
189210
190211.PHONY : html_meta
191212html_meta : deps # # Add meta data headers to all Markdown pages
@@ -196,6 +217,7 @@ doctest: deps
196217 cd $(DOCS_DIR ) && $(SPHINXBUILD ) -b doctest $(ALLSPHINXOPTS ) $(BUILDDIR ) /doctest
197218 @echo " Testing of doctests in the sources finished, look at the " \
198219 " results in $( BUILDDIR) /doctest/output.txt."
220+ @echo
199221
200222.PHONY : test
201223test : clean linkcheckbroken # # Clean docs build, then run linkcheckbroken
@@ -219,15 +241,16 @@ rtd-pr-preview: ## Build pull request preview on Read the Docs
219241 pip install -r requirements.txt
220242 git submodule init
221243 git submodule update
222- pip install -e submodules/plone.api[test]
244+ pip install plone.api -c submodules/plone.api/constraints.txt
245+ pip install --no-deps -e submodules/plone.api[test]
223246 ln -s ../submodules/volto/docs/source ./docs/volto
224247 ln -s ../submodules/plone.restapi ./docs/plone.restapi
225248 ln -s ../submodules/plone.api/docs ./docs/plone.api
226249 cd $(DOCS_DIR ) && sphinx-build -b html $(ALLSPHINXOPTS ) ${READTHEDOCS_OUTPUT} /html/
227250
228251.PHONY : storybook
229252storybook :
230- cd submodules/volto && pnpm i && pnpm build:registry && pnpm --filter @plone/volto build-storybook -o ../../../../_build/html/storybook
253+ cd submodules/volto && pnpm i && pnpm build:registry && pnpm build:components && pnpm --filter @plone/volto build-storybook -o ../../../../_build/html/storybook
231254
232255.PHONY : all
233256all : clean vale linkcheck html # # Clean docs build, then run vale and linkcheck, and build html
0 commit comments