Skip to content

Commit 6e4c8a9

Browse files
committed
feat: initial copier
1 parent 0e06071 commit 6e4c8a9

File tree

271 files changed

+39454
-102
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

271 files changed

+39454
-102
lines changed

.github/workflows/test.yaml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: Tests
2+
3+
on:
4+
push:
5+
# on all branches
6+
7+
jobs:
8+
test:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Checkout
12+
uses: actions/checkout@v4
13+
- name: Install uv
14+
uses: astral-sh/setup-uv@v5
15+
- name: Set up Python
16+
run: uv python install
17+
- name: Run tests
18+
run: uv run pytest

.gitignore

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,11 @@
33
venv/
44
.nox
55
__pycache__
6+
*.py[oc]
67
*.egg-info/
8+
.pytest_cache/
9+
dist/
10+
wheels/
711

812
# Sphinx
913
build
@@ -19,4 +23,4 @@ node_modules
1923
# editors
2024
.idea/
2125
!.vscode/*.sample
22-
.vscode/*
26+
.vscode/*

.prettierignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Everything from .gitignore ignored by Prettier too

.python-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
3.11

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Changelog
2+
3+
All notable changes to this project will be documented in this file.
4+
5+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7+
8+
## [Unreleased]
9+
10+
Initial version.

README.md

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
<div align="center">
2+
3+
<a href="https://documatt.com/sphinx-docs-template">
4+
<img src="https://github.com/documatt/sphinx-docs-template/blob/main/hero.png?raw=true" alt="Project hero image">
5+
</a>
6+
7+
<h1>Sphinx Documentation Template</h1>
8+
9+
<p><strong>An opinionated template for creating a modern Sphinx documentation project. Write in Markdown or reStructuredText, translate to multiple languages, boost with popular extensions, and enjoy automatic live reload on change.</strong></p>
10+
11+
<p>Default blank Sphinx documentation project needs a lot of configuration, fine-tuning, trials, and fails before setting up everything for best results. This template results from the best practices and knowledge we gained by providing <a href="https://documatt.com/services">Documatt's technical writing services</a>.</p>
12+
13+
<p>
14+
<a href="https://documatt.com/sphinx-docs-template">📚Documentation</a> ·
15+
<a href="https://github.com/documatt/sphinx-docs-template">📟 Source code</a>
16+
</p>
17+
18+
<p>
19+
<a href="https://github.com/copier-org/copier"><img src="https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/copier-org/copier/master/img/badge/badge-grayscale-inverted-border-orange.json&labelColor=097cba&color=163B36" alt="Made with Copier badge"/></a>
20+
<a href="https://github.com/documatt/sphinx-docs-template">
21+
<img src="https://img.shields.io/github/stars/documatt/sphinx-docs-template?style=flat&logo=github&labelColor=097cba&color=163B36" alt="GitHub Repo stars badge">
22+
</a>
23+
<a href="https://github.com/documatt/sphinx-docs-template/actions/workflows/test.yaml">
24+
<img src="https://github.com/documatt/sphinx-docs-template/actions/workflows/test.yaml/badge.svg" alt="GitHub tests badge">
25+
</a>
26+
<img src="https://img.shields.io/badge/codestyle-Prettier-blue?labelColor=097cba&color=163B36" alt="Code style Prettier badge">
27+
<a href="https://raw.githubusercontent.com/documatt/sphinx-docs-template/refs/heads/main/LICENSE">
28+
<img src="https://img.shields.io/badge/license-MIT-blue?labelColor=097cba&color=163B36" alt="MIT licence badge">
29+
</a>
30+
</p>
31+
32+
</div>
33+
34+
<!-- Very short intro -->
35+
36+
The repository is the Copier template. Copier is a command-line tool for creating projects from templates. It requires Python installed, but no knowledge of Python to use.
37+
38+
To use the template, [install Copier](https://www.cookiecutter.io) first and then run the following command in your terminal:
39+
40+
```
41+
cookiecutter https://github.com/documatt/sphinx-docs-template
42+
```
43+
44+
Answer the series of questions, and you are ready to go. You have the skeleton of a completely functional Sphinx project in just a few moments.
45+
46+
<!-- TODO: Screenshot / video -->
47+
<div align="center">
48+
<img alt="Quickstart" src="https://raw.githubusercontent.com/cruft/cruft/master/art/example.gif">
49+
</div>
50+
51+
## Key Features
52+
53+
The Sphinx documentation template creates supports:
54+
55+
- 💯 Free & open-source.
56+
- ✍️ Write in Markdown or reStructuredText.
57+
- 🏗️ Comes with popular Sphinx extension for sitemaps, redirects, diagrams, etc.
58+
- 👅 Localization (i18n) support.
59+
- 😀 Sane configuration defaults and best practices.
60+
- 🎨 Format on save in VS Code.
61+
- ⚒️ Live reload on change.
62+
- 💾 Build to multiple outputs.
63+
- 👍 Works out-of-the-box.
64+
65+
Learn more in [📚documentation](https://documatt.com/sphinx-docs-template).
66+
67+
## Community and contributions
68+
69+
Bug repors, feature requests, or all contributions are welcome at our [GitHub homepage](https://github.com/documatt/sphinx-docs-template/).
70+
71+
Connect with other fellows who are building with Sphinx. Share knowledge, get help, and contribute to the open-source project. Check out our [Documatt Community](https://documatt.com/community) page to see featured material and upcoming events.
72+
73+
Join our community here:
74+
75+
- 🌟 [Explore our GitHub](https://github.com/documatt)
76+
- 📥 [Subscribe to our newsletter](https://documatt.com/newsletter-signup/)
77+
- 🐦 [Follow us on X](https://x.com/documattcom)
78+
- 🕴️ [Follow us on LinkedIn](https://www.linkedin.com/company/documattcom)
79+
- 📺 [Subscribe to our YouTube channel](https://www.youtube.com/@Documatt)
80+
- 📚 [Read our blog posts](https://documatt.com/blog)
81+
82+
## Legal
83+
84+
Project is is MIT licensed.
85+
86+
Icon "copy" by [TabletIcons](https://tablericons.com/icon/copy).

copier.yaml

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
_jinja_extensions:
2+
- jinja2_time.TimeExtension
3+
4+
# Template lives in
5+
_subdirectory: template
6+
7+
# questions
8+
project_name:
9+
type: str
10+
default: My Documentation
11+
help: The name for humans. Like 'My Documentation'.
12+
13+
project_slug:
14+
type: str
15+
default: "{{ project_name|lower|replace(' ', '-') }}"
16+
help: The name for machines. Like 'my_documentation'. Must be a valid folder name. We recommend do not use spaces, special characters, etc. Like 'my-documentation'."
17+
18+
project_author: John Doe
19+
20+
project_version: 0.1.0
21+
22+
license:
23+
type: str
24+
help: The license for the project. Like 'MIT'. Simple and permissive open-source license is 'MIT'. If none of above, choose 'Other' and replace in 'LICENSE' file.
25+
default: MIT
26+
choices:
27+
- MIT
28+
- BSD-3-Clause
29+
- GPL-3.0
30+
- Other
31+
32+
html_baseurl:
33+
type: str
34+
help: The address which visitors will use to reach the HTML documentation after publishing. Used for canonical link relations, and sitemap generation. Like 'https://documatt.com' or 'https://docs.documatt.com'.
35+
validator: "{% if not html_baseurl %}Value cannot be empty{% elif html_baseurl.endswith('/') %}MUST NOT END with trailing slash, like 'https://documatt.com/'{% endif %}"
36+
default: https://documatt.com
37+
38+
html_theme:
39+
help: The theme to use for HTML output. Like 'alabaster'.
40+
choices:
41+
- alabaster
42+
default: alabaster
43+
44+
default_language:
45+
default: en
46+
help: The main language of your documentation. Like 'en'.
47+
validator: "{% if not default_language %}Value cannot be empty{% endif %}"
48+
49+
other_languages:
50+
default: []
51+
help: If you want to translate your documentation to other langauges, type them here or type '[]' (an empty list). The value must by a valid Python list expression like ['es', 'fr', 'de'].",
52+
validator: "{% if not other_languages is sequence %}Value must be a valid Python list{% elif default_language in other_languages %}The default language '{{ default_language }}' CANNOT be in other languages.{% endif %}"
53+
54+
default_builder:
55+
help: The main output format of your documentation. Enter the valid Sphinx builder like 'html'.
56+
default: html
57+
choices:
58+
- html
59+
- dirhtml
60+
- singlehtml
61+
62+
other_builders:
63+
default: []
64+
help: "If you want to build your documentation to other formats, choose additional builders here. "
65+
choices:
66+
- html
67+
- dirhtml
68+
- singlehtml
69+
multiselect: true
70+
validator: "{% if default_builder in other_builders %}The default builder '{{ default_builder }}' CANNOT be in other builders.{% endif %}"

0 commit comments

Comments
 (0)