diff --git a/python/hooks/post_gen_project.py b/python/hooks/post_gen_project.py index a8a874e..6e456c0 100644 --- a/python/hooks/post_gen_project.py +++ b/python/hooks/post_gen_project.py @@ -1,6 +1,8 @@ """Provide hooks to run after project is generated.""" +from pathlib import Path import shutil if not {{ cookiecutter.add_docs }}: shutil.rmtree("docs") + Path(".readthedocs.yaml").unlink() diff --git a/python/{{cookiecutter.project_slug}}/.readthedocs.yaml b/python/{{cookiecutter.project_slug}}/.readthedocs.yaml new file mode 100644 index 0000000..24bdd85 --- /dev/null +++ b/python/{{cookiecutter.project_slug}}/.readthedocs.yaml @@ -0,0 +1,16 @@ +version: 2 + +build: + os: "ubuntu-20.04" + tools: + python: "3.11" + +python: + install: + - method: pip + path: . + extra_requirements: + - docs + +sphinx: + configuration: docs/source/conf.py