Skip to content

Commit e063519

Browse files
committed
feat: add an option to use Zensical
1 parent 5202984 commit e063519

12 files changed

Lines changed: 188 additions & 4 deletions

changelog.d/+fa4391ba.added.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Add an option to use Zensical.

copier.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,7 @@ docs:
190190
when: "{{ 'docs' in features }}"
191191
choices:
192192
MkDocs: mkdocs
193+
Zensical: zensical
193194

194195
doctest:
195196
type: str

template/.pre-commit-config.yaml.jinja

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ repos:
4848
{%- endif %}
4949
additional_dependencies:
5050
- mdformat-gfm
51-
{%- if docs == 'mkdocs' %}
51+
{%- if docs == 'mkdocs' or docs == 'zensical' %}
5252
- id: mdformat
5353
files: ^docs/
5454
additional_dependencies:

template/pyproject.toml.jinja

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,12 @@ docs = [
103103
"mkdocs-material>=9.7",
104104
"mkdocstrings-python>=2",
105105
]
106+
{%- elif docs == "zensical" %}
107+
docs = [
108+
"black>=25.11",
109+
"zensical>=0.0.11",
110+
"mkdocstrings-python>=2",
111+
]
106112
{%- endif %}
107113
lint = [
108114
"pre-commit>=4.5",
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
--8<-- "CHANGELOG.md"
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# {{ project_name }}
2+
3+
[![PyPI](https://img.shields.io/pypi/v/{{ distribution_name }})](https://pypi.org/project/{{ distribution_name }}/)
4+
[![Supported Python versions](https://img.shields.io/pypi/pyversions/{{ distribution_name }}?logo=python)](https://pypi.org/project/{{ distribution_name }}/)
5+
[![CI](https://img.shields.io/github/actions/workflow/status/{{ repository_path }}/ci.yaml?branch=main&logo=github&label=CI)](https://github.com/{{ repository_path }}/actions/workflows/ci.yaml)
6+
[![License](https://img.shields.io/github/license/{{ repository_path }})](https://github.com/{{ repository_path }}/blob/main/LICENSE)
7+
[![mypy](https://www.mypy-lang.org/static/mypy_badge.svg)](https://mypy-lang.org)
8+
[![black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
9+
[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)
10+
[![uv](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/uv/main/assets/badge/v0.json)](https://github.com/astral-sh/uv)
11+
{% if description %}
12+
{{ description }}.
13+
{% endif %}
14+
## Installation
15+
16+
Install `{{ distribution_name }}` using [pip](https://pip.pypa.io/) or [uv](https://docs.astral.sh/uv/):
17+
18+
```
19+
pip install {{ distribution_name }}
20+
```
21+
{% if cli %}
22+
## Execution
23+
24+
Execute `{{ distribution_name }}` using [uvx](https://docs.astral.sh/uv/):
25+
26+
```
27+
uvx {{ distribution_name }}
28+
```
29+
{% endif -%}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
title: API
3+
---
4+
5+
# ::: {{ package_name }}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Reference
2+
3+
The reference section provides:
4+
5+
- [API](./api.md): The reference for all classes, functions, parameters and attributes.
6+
{% if cli %}
7+
- [Commands](./cli.md): The reference for the command-line interface.
8+
{% endif -%}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Commands
2+
3+
## {{ distribution_name }}
4+
5+
Run the main program.
6+
7+
### Usage
8+
9+
```
10+
{{ distribution_name }} [OPTIONS]
11+
```
Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
[project]
2+
site_name = "{{ project_name }}"
3+
site_description = "{{ project_description }}"
4+
site_author = "{{ user_name }}"
5+
site_url = "{{ documentation_url }}/"
6+
copyright = "Copyright &copy; {{ copyright_year }} {{ copyright_owner }}"
7+
repo_url = "{{ repository_url }}"
8+
repo_name = "{{ repository_path }}"
9+
edit_uri = "edit/main/docs/"
10+
11+
[project.theme]
12+
features = [
13+
"announce.dismiss",
14+
"content.action.edit",
15+
"content.action.view",
16+
"content.code.annotate",
17+
"content.code.copy",
18+
"content.code.select",
19+
"content.footnote.tooltips",
20+
"content.tabs.link",
21+
"content.tooltips",
22+
"navigation.footer",
23+
"navigation.indexes",
24+
"navigation.instant",
25+
"navigation.instant.prefetch",
26+
"navigation.path",
27+
"navigation.sections",
28+
"navigation.tabs",
29+
"navigation.tabs.sticky",
30+
"navigation.top",
31+
"navigation.tracking",
32+
"search.highlight",
33+
"toc.follow",
34+
]
35+
36+
[[project.theme.palette]]
37+
scheme = "default"
38+
toggle.icon = "lucide/sun"
39+
toggle.name = "Switch to dark mode"
40+
41+
[[project.theme.palette]]
42+
scheme = "slate"
43+
toggle.icon = "lucide/moon"
44+
toggle.name = "Switch to light mode"
45+
46+
[project.theme.font]
47+
text = "Inter"
48+
code = "JetBrains Mono"
49+
50+
[[project.extra.social]]
51+
icon = "fontawesome/brands/github"
52+
link = "{{ repository_url}}"
53+
54+
[project.markdown_extensions]
55+
pymdownx.snippets = {}
56+
pymdownx.highlight = { anchor_linenums = true, pygments_lang_class = true }
57+
pymdownx.superfences = {}
58+
pymdownx.tabbed = { alternate_style = true }
59+
60+
[project.plugins.mkdocstrings.handlers.python]
61+
inventories = [
62+
"https://docs.python.org/3/objects.inv",
63+
]
64+
65+
[project.plugins.mkdocstrings.handlers.python.options]
66+
parameter_headings = true
67+
show_root_heading = true
68+
show_symbol_type_heading = true
69+
show_symbol_type_toc = true
70+
type_parameter_headings = true
71+
inherited_members = true
72+
members_order = "source"
73+
summary = true
74+
docstring_style = "google"
75+
docstring_options = { ignore_init_summary = true }
76+
docstring_section_style = "table"
77+
merge_init_into_class = true
78+
show_signature_annotations = true
79+
show_signature_type_parameters = true
80+
separate_signature = true
81+
signature_crossrefs = true

0 commit comments

Comments
 (0)