Skip to content

Commit feeffa8

Browse files
committed
✨ feat: add README.md.jinja for the template
1 parent d7fb7a7 commit feeffa8

2 files changed

Lines changed: 105 additions & 3 deletions

File tree

copier.yaml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,19 +60,28 @@ homepage:
6060
when: "{{ repository_provider == 'github' }}"
6161
type: str
6262
help: "The project Homepage"
63-
default: "https://{{ author_github_handle }}.github.io/{{ project_name }}"
63+
default: >-
64+
{% if repository_provider == 'github' -%}
65+
https://{{ author_github_handle }}.github.io/{{ project_name }}
66+
{%- endif %}
6467
6568
repository:
6669
when: "{{ repository_provider == 'github' }}"
6770
type: str
6871
help: "The project Repository"
69-
default: "https://github.com/{{ author_github_handle }}/{{ project_name }}"
72+
default: >-
73+
{% if repository_provider == 'github' -%}
74+
https://github.com/{{ author_github_handle }}/{{ project_name }}
75+
{%- endif %}
7076
7177
documentation:
7278
when: "{{ repository_provider == 'github' }}"
7379
type: str
7480
help: "The project Documentation"
75-
default: "https://{{ author_github_handle }}.github.io/{{ project_name }}"
81+
default: >-
82+
{% if repository_provider == 'github' -%}
83+
https://{{ author_github_handle }}.github.io/{{ project_name }}
84+
{%- endif %}
7685
7786
copyright_license:
7887
type: str

template/README.md.jinja

Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,96 @@
2626
{%- endif %}
2727

2828
</div>
29+
30+
## Installation
31+
32+
{% if publish_to_pypi -%}
33+
You can install this package in several ways:
34+
35+
### From PyPI
36+
37+
- Using `pip`:
38+
39+
```bash
40+
pip install {{ project_name }}
41+
```
42+
43+
- Using `uv`:
44+
45+
```bash
46+
uv add {{ project_name }}
47+
```
48+
{%- endif %}
49+
50+
{% if repository_provider == 'github' -%}
51+
{% if publish_to_pypi -%}
52+
### From Source
53+
{% else -%}
54+
You can install this package in several ways:
55+
{% endif %}
56+
57+
- Directly from GitHub:
58+
59+
```bash
60+
uv add git+{{ repository }}
61+
```
62+
63+
- Or by cloning the repository:
64+
65+
```bash
66+
git clone {{ repository }}
67+
cd my-package
68+
```
69+
70+
Then, install the dependencies using Make:
71+
72+
{% elif publish_to_pypi -%}
73+
### From Source
74+
{% else -%}
75+
To install the package, simply run:
76+
{% endif %}
77+
78+
- For production dependencies:
79+
80+
```bash
81+
make setup
82+
```
83+
84+
- For development setup (includes dev dependencies and Git hooks):
85+
86+
```bash
87+
make setup-dev
88+
```
89+
90+
> [!info]
91+
> Using `make` ensures that `uv` is installed automatically if it's not already present.
92+
93+
{% if with_typer_cli -%}
94+
> [!tip]
95+
> To make the CLI available globally (without needing to activate the virtual environment every time), you can run:
96+
> ```bash
97+
> make setup-cli
98+
> ```
99+
{%- endif %}
100+
101+
> [!tip]
102+
> This quick guide should get you started, but for a complete overview of the project's features and usage, check out the original [python-template-uv](https://github.com/bassemkaroui/python-template-uv) template used to generate this repository.
103+
104+
{% if not documentation -%}
105+
## Documentation
106+
107+
You can generate the project documentation locally by running:
108+
109+
```bash
110+
make docs
111+
```
112+
113+
This will build the documentation using MkDocs.
114+
Once generated, simply open the provided URL in your browser to explore it.
115+
{%- endif %}
116+
117+
{% if copyright_license != "No License" -%}
118+
## 📄 License
119+
120+
This project is released under the **{{ copyright_license }}**. {% if repository %}See [LICENSE]({{ repository }}/blob/main/LICENSE) for details.{% endif -%}
121+
{%- endif -%}

0 commit comments

Comments
 (0)