Skip to content

Commit c98b950

Browse files
committed
mkdocs -> zensical
1 parent 8183e23 commit c98b950

7 files changed

Lines changed: 33 additions & 32 deletions

File tree

Makefile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,17 @@ all: build test
55
.PHONY: build
66
build:
77
@rm -rf ./build
8-
@PYTHONWARNINGS=ignore uvx copier copy -q --trust --force --vcs-ref=HEAD . ./build
8+
@PYTHONWARNINGS=ignore uvx copier copy -q --trust --force --vcs-ref=HEAD -d docs=true -d docker=true . ./build
99

1010
.PHONY: test
1111
test:
1212
@uv --directory=build run task lint
1313
@uv --directory=build run task test -q
1414

15+
.PHONY: docs
16+
docs:
17+
@uv --directory=build run task docs
18+
1519
.PHONY: release
1620
release:
1721
@git tag $(VERSION)

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ uvx copier copy --trust gh:branchv/python-template .
2222
- Automated versioning, changelog, and release via [Conventional Commits](https://www.conventionalcommits.org/)
2323
- Automated dependency updates via [Dependabot](https://dependabot.com/)
2424
- Editor integration: [VS Code](https://code.visualstudio.com/)
25-
- Documentation: [MkDocs](https://www.mkdocs.org/) (optional)
25+
- Documentation: [Zensical](https://zensical.org/) (optional)
2626
- Docker support (optional)
2727

2828
## Recommended Tools

src/pyproject.toml.jinja

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,12 @@ classifiers = ["Private :: Do Not Upload"]
1212
{%- endif %}
1313

1414
[dependency-groups]
15-
{%- if docs %}
16-
docs = ["mkdocs", "mkdocs-material"]
17-
{%- endif %}
18-
dev = ["prek", "pytest", "ruff", "taskipy", "ty"]
15+
dev = ["prek", "pytest", "ruff", "taskipy", "ty"{%- if docs %}, "zensical"{%- endif %}]
1916

2017
[tool.taskipy.tasks]
2118
clean = { cmd = "rm -rf .*_cache/ dist/", help = "Remove build artifacts" }
2219
{% if docs -%}
23-
docs = { cmd = "mkdocs serve -f docs/mkdocs.yaml", help = "Serve documentation"}
20+
docs = { cmd = "zensical serve", help = "Serve documentation"}
2421
{% endif -%}
2522
lint = { cmd = "prek run --all-files", help = "Run linters and formatters" }
2623
test = { cmd = "pytest", help = "Run tests" }
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
--8<-- "./README.md"

src/{% if docs %}docs{% endif %}/mkdocs.yaml.jinja

Lines changed: 0 additions & 24 deletions
This file was deleted.

src/{% if docs %}docs{% endif %}/src/index.md

Lines changed: 0 additions & 1 deletion
This file was deleted.
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
[project]
2+
site_name = "{{project_name}}"
3+
site_description = "{{project_description}}"
4+
site_url = "https://{{repo_username}}.github.io/{{repo_name}}"
5+
repo_url = "https://github.com/{{repo_username}}/{{repo_name}}"
6+
repo_name = "{{repo_username}}/{{repo_name}}"
7+
nav = [{ "Overview" = "index.md" }]
8+
9+
# https://zensical.org/docs/setup/extensions/
10+
[project.markdown_extensions]
11+
admonition = {}
12+
pymdownx.snippets = { check_paths = true }
13+
pymdownx.superfences = {}
14+
toc = { permalink = true }
15+
16+
[[project.theme.palette]]
17+
scheme = "default"
18+
toggle.icon = "lucide/sun"
19+
toggle.name = "Switch to dark mode"
20+
21+
[[project.theme.palette]]
22+
scheme = "slate"
23+
toggle.icon = "lucide/moon"
24+
toggle.name = "Switch to light mode"

0 commit comments

Comments
 (0)