File tree Expand file tree Collapse file tree 1 file changed +8
-7
lines changed
{{cookiecutter.project_name}} Expand file tree Collapse file tree 1 file changed +8
-7
lines changed Original file line number Diff line number Diff line change 11from __future__ import annotations
22
3- {% - if cookiecutter .docs == 'sphinx' % }
4-
3+ {% if cookiecutter .docs == 'sphinx' - % }
54import argparse
6-
7- {% - endif % }
8-
5+ {% endif - % }
96import shutil
107from pathlib import Path
118
@@ -109,12 +106,16 @@ def build_api_docs(session: nox.Session) -> None:
109106@nox .session (reuse_venv = True , default = False )
110107def docs (session : nox .Session ) -> None :
111108 """
112- Serve the docs
109+ Make or serve the docs. Pass --non-interactive to avoid serving.
113110 """
114111
115112 doc_deps = nox .project .dependency_groups (PROJECT , "docs" )
116113 session .install ("{% if cookiecutter.backend != " mesonpy " %}-e{% endif %}." , * doc_deps )
117- session .run ("mkdocs" , "serve" , "--clean" )
114+
115+ if session .interactive :
116+ session .run ("mkdocs" , "serve" , "--clean" , * session .posargs )
117+ else :
118+ session .run ("mkdocs" , "build" , "--clean" , * session .posargs )
118119
119120
120121{% - endif % }
You can’t perform that action at this time.
0 commit comments