Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions copier.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,3 +65,8 @@ python_version_primary:
"3.12":
value: "3.12"
help: Primary version of Python to use in CI/CD

add_docs:
type: bool
default: false
help: Add documentation using Yardang/Sphinx
23 changes: 23 additions & 0 deletions cpp/.github/workflows/{% if add_docs %}docs.yaml{% endif %}.jinja
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Docs
on:
push:
branches:
- main
workflow_dispatch:
permissions:
contents: write
jobs:
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions-ext/python/setup@main
- uses: actions-ext/node/setup@main
- run: uv pip install .
- run: uv pip install yardang
- run: yardang build
- uses: peaceiris/actions-gh-pages@v4
with:
publish_branch: gh-pages
github_token: {% raw %}${{ secrets.GITHUB_TOKEN }}{% endraw %}
publish_dir: docs/html
3 changes: 2 additions & 1 deletion cpp/.gitignore.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,9 @@ dmypy.json
.pyre/

# Documentation
docs/_build/
/site
index.md
docs/_build/
docs/api
docs/index.md
docs/html
Expand Down
3 changes: 2 additions & 1 deletion examples/cpp.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
add_extension: cpp
add_docs: true
add_extension: cpp
email: 3105306+timkpaine@users.noreply.github.com
github: python-project-templates
project_description: A C++-Python project template
Expand Down
3 changes: 2 additions & 1 deletion examples/js.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
add_extension: js
add_docs: true
add_extension: js
email: 3105306+timkpaine@users.noreply.github.com
github: python-project-templates
project_description: A JavaScript-Python project template
Expand Down
1 change: 1 addition & 0 deletions examples/jupyter.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---
add_docs: true
add_extension: jupyter
email: 3105306+timkpaine@users.noreply.github.com
github: python-project-templates
Expand Down
1 change: 1 addition & 0 deletions examples/python.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---
add_docs: true
add_extension: python
email: 3105306+timkpaine@users.noreply.github.com
github: python-project-templates
Expand Down
1 change: 1 addition & 0 deletions examples/rust.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---
add_docs: true
add_extension: rust
email: 3105306+timkpaine@users.noreply.github.com
github: python-project-templates
Expand Down
23 changes: 23 additions & 0 deletions js/.github/workflows/{% if add_docs %}docs.yaml{% endif %}.jinja
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Docs
on:
push:
branches:
- main
workflow_dispatch:
permissions:
contents: write
jobs:
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions-ext/python/setup@main
- uses: actions-ext/node/setup@main
- run: uv pip install .
- run: uv pip install yardang
- run: yardang build
- uses: peaceiris/actions-gh-pages@v4
with:
publish_branch: gh-pages
github_token: {% raw %}${{ secrets.GITHUB_TOKEN }}{% endraw %}
publish_dir: docs/html
3 changes: 2 additions & 1 deletion js/.gitignore.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,9 @@ dmypy.json
.pyre/

# Documentation
docs/_build/
/site
index.md
docs/_build/
docs/api
docs/index.md
docs/html
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Docs
on:
push:
branches:
- main
workflow_dispatch:
permissions:
contents: write
jobs:
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions-ext/python/setup@main
- uses: actions-ext/node/setup@main
- run: uv pip install .
- run: uv pip install yardang
- run: yardang build
- uses: peaceiris/actions-gh-pages@v4
with:
publish_branch: gh-pages
github_token: {% raw %}${{ secrets.GITHUB_TOKEN }}{% endraw %}
publish_dir: docs/html
3 changes: 2 additions & 1 deletion jupyter/.gitignore.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,9 @@ dmypy.json
.pyre/

# Documentation
docs/_build/
/site
index.md
docs/_build/
docs/api
docs/index.md
docs/html
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Docs
on:
push:
branches:
- main
workflow_dispatch:
permissions:
contents: write
jobs:
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions-ext/python/setup@main
- uses: actions-ext/node/setup@main
- run: uv pip install .
- run: uv pip install yardang
- run: yardang build
- uses: peaceiris/actions-gh-pages@v4
with:
publish_branch: gh-pages
github_token: {% raw %}${{ secrets.GITHUB_TOKEN }}{% endraw %}
publish_dir: docs/html
4 changes: 2 additions & 2 deletions python/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -125,11 +125,11 @@ dmypy.json
.pyre/

# Documentation
docs/_build/
/site
index.md
docs/_build/
docs/api
docs/index.md
_template/labextension

# Jupyter
.ipynb_checkpoints
Expand Down
10 changes: 10 additions & 0 deletions python/pyproject.toml.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -115,3 +115,13 @@ section-order = ["future", "standard-library", "third-party", "first-party", "lo

[tool.ruff.lint.per-file-ignores]
"__init__.py" = ["F401"]

{%- if add_docs %}

[tool.yardang]
title = "{{ project_name }}"
root = "README.md"
pages = []
use-autoapi = true

{% endif -%}
23 changes: 23 additions & 0 deletions rust/.github/workflows/{% if add_docs %}docs.yaml{% endif %}.jinja
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Docs
on:
push:
branches:
- main
workflow_dispatch:
permissions:
contents: write
jobs:
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions-ext/python/setup@main
- uses: actions-ext/node/setup@main
- run: uv pip install .
- run: uv pip install yardang
- run: yardang build
- uses: peaceiris/actions-gh-pages@v4
with:
publish_branch: gh-pages
github_token: {% raw %}${{ secrets.GITHUB_TOKEN }}{% endraw %}
publish_dir: docs/html
3 changes: 2 additions & 1 deletion rust/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,9 @@ dmypy.json
.pyre/

# Documentation
docs/_build/
/site
index.md
docs/_build/
docs/api
docs/index.md
docs/html
Expand Down
Loading