Skip to content

Commit d0146fc

Browse files
committed
Add support for Read the Docs
1 parent a900ef4 commit d0146fc

21 files changed

Lines changed: 139 additions & 27 deletions

File tree

.editorconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,5 +26,5 @@ trim_trailing_whitespace = false
2626
[*.py]
2727
indent_size = 4
2828

29-
[*.yml]
29+
[*.{yaml,yml}]
3030
indent_size = 2

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,5 @@
2222
*.py text eol=lf
2323
*.toml text eol=lf
2424
*.txt text eol=lf
25+
*.yaml text eol=lf
2526
*.yml text eol=lf

.vscode/settings.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
"**/?? cookiecutter.pypi_package_name ??/**/*.md": "jinja-md",
2525
"**/?? cookiecutter.pypi_package_name ??/**/*.py": "jinja-py",
2626
"**/?? cookiecutter.pypi_package_name ??/**/*.toml": "jinja-toml",
27+
"**/?? cookiecutter.pypi_package_name ??/**/*.yaml": "jinja-yaml",
2728
"**/?? cookiecutter.pypi_package_name ??/**/*.yml": "jinja-yaml",
2829
"**/?? cookiecutter.pypi_package_name ??/**/PKGBUILD": "jinja-shell",
2930
"**/hooks/*_gen_project.py": "jinja-py"

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,9 @@ The Cookiecutter template will give you:
7171

7272
- a pytest script and default configuration;
7373

74-
- a `pdoc` setup to generate documentation;
74+
- a Sphinx setup to generate HTML documentation and a manual page;
75+
76+
- a configuration file for Read the Docs;
7577

7678
- a set of `poe` tasks for running the module scripts, tests and the
7779
linter (for details, run `poetry run poe tasks`);

{{ cookiecutter.pypi_package_name }}/.editorconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,5 +26,5 @@ trim_trailing_whitespace = false
2626
[*.py]
2727
indent_size = 4
2828

29-
[*.yml]
29+
[*.{yaml,yml}]
3030
indent_size = 2

{{ cookiecutter.pypi_package_name }}/.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,5 @@
2222
*.py text eol=lf
2323
*.toml text eol=lf
2424
*.txt text eol=lf
25+
*.yaml text eol=lf
2526
*.yml text eol=lf

{{ cookiecutter.pypi_package_name }}/.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,5 +61,5 @@ jobs:
6161
- name: Run unit tests
6262
run: poetry run poe tests
6363

64-
- name: Run man page generator
64+
- name: Run man page and HTML documentation generator
6565
run: poetry run poe doc

{{ cookiecutter.pypi_package_name }}/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
/debian/{{ cookiecutter.pypi_package_name }}.*.debhelper
77
/debian/{{ cookiecutter.pypi_package_name }}.substvars
88
/dist/
9+
/doc/sphinx/autoapi/
910
/.pc/
1011
/.venv/
1112
*.egg-info
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# .readthedocs.yaml
2+
# Read the Docs configuration file
3+
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
4+
5+
version: 2
6+
7+
build:
8+
os: ubuntu-22.04
9+
tools:
10+
python: "{{ cookiecutter.python_version }}"
11+
12+
python:
13+
install:
14+
- requirements: doc/requirements.txt
15+
16+
sphinx:
17+
configuration: doc/sphinx/conf.py

{{ cookiecutter.pypi_package_name }}/CONTRIBUTING.md

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,13 +166,19 @@ act
166166

167167
### Generating project documentation
168168

169-
To generate project documentation, run:
169+
To generate project documentation (HTML and man page), run:
170170

171171
```shell
172172
poetry run poe doc
173173
```
174174

175-
To open the generated documentation with `man`, run:
175+
To open the generated HTML documentation in your browser, run:
176+
177+
```shell
178+
poetry run poe html
179+
```
180+
181+
To open the generated manual page in your terminal, run:
176182

177183
```shell
178184
poetry run poe man
@@ -204,3 +210,11 @@ To check {{ cookiecutter.project_title }}’s dependencies for compatible update
204210
```shell
205211
poetry update --dry-run
206212
```
213+
214+
### Updating requirements file for Read the Docs
215+
216+
To update the `doc/requirements.txt` file for Read the Docs, run:
217+
218+
```shell
219+
poetry export --only doc --output doc/requirements.txt
220+
```

0 commit comments

Comments
 (0)