Skip to content

Commit d4f30f1

Browse files
authored
Merge pull request #8 from febus982/docs-improvements
Docs improvements
2 parents 73acd54 + 3d40f17 commit d4f30f1

File tree

4 files changed

+30
-14
lines changed

4 files changed

+30
-14
lines changed

README.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ It is configured with all the following features:
2929

3030
This project doesn't currently use [tox](https://tox.wiki/en/4.11.4/index.html) or other matrix
3131
testing utilities. I prefer to run the tests only against the latest python locally, and run
32-
previous python versions directly in the CI pipeline to catch these bugs.
32+
previous python versions directly in the CI pipeline.
3333

3434
## How to use this repository template to create a new package
3535

@@ -41,8 +41,8 @@ previous python versions directly in the CI pipeline to catch these bugs.
4141
* Owner: The github repository owner (in this case `febus982`)
4242
* Repository name: The github repository name (in this case `bootstrap-python-package`)
4343
* Workflow name: `release.yml`
44-
* Create a GitHub Actions secret named `CODECLIMATE_REPORTER_ID` (at URL https://github.com/GITHUB_NAME_OR_ORGANIZATION/GITHUB_REPOSITORY/settings/secrets/actions)
45-
containing the codeclimate reporter id (you can find it at https://codeclimate.com/repos/YOUR_REPO_ID/settings/test_reporter).
44+
* Create a GitHub Actions secret named `CODECLIMATE_REPORTER_ID` (at URL `https://github.com/GITHUB_NAME_OR_ORGANIZATION/GITHUB_REPOSITORY/settings/secrets/actions`)
45+
containing the codeclimate reporter id (you can find it at `https://codeclimate.com/repos/YOUR_REPO_ID/settings/test_reporter`).
4646
If you don't want to use CodeClimate just delete `workflows/python-quality.yml`.
4747
* Update the badges in `README.md`! (check [shields.io](https://shields.io/) for extra badges)
4848
* Setup local development:
@@ -51,7 +51,7 @@ previous python versions directly in the CI pipeline to catch these bugs.
5151
* Install dev dependencies with `make dev-dependencies`
5252
* Setup GitHub pages (this need local development setup):
5353
* Initialise documentation branch `poetry run mike deploy dev latest --update-aliases --push`
54-
* Enable GitHub Actions for GitHub Pages (at URL https://github.com/GITHUB_NAME_OR_ORGANIZATION/GITHUB_REPOSITORY/settings/pages)
54+
* Configure GitHub Pages to deploy from the `gh-pages` branch (at URL `https://github.com/GITHUB_NAME_OR_ORGANIZATION/GITHUB_REPOSITORY/settings/pages`)
5555

5656
**IMPORTANT:** The repository is configured to deploy on the [test PyPI repository](https://test.pypi.org/).
5757
It's strongly recommended to create the project in the [test PyPI repository](https://test.pypi.org/) and test
@@ -64,8 +64,10 @@ This setup uses [poetry-dynamic-versioning](https://github.com/mtkennerly/poetry
6464
This means it's not necessary to commit the version in the code but the CI pipeline
6565
will infer it from the git tag.
6666

67-
To release a new version, just create a new release in the github repository. It will
68-
create a new tag and do all the magic.
67+
To release a new version, just create a new release and tag in the GitHub repository, to:
68+
69+
* Build and deploy the python package to PyPI
70+
* Build and deploy a new version of the documentation to GitHub pages
6971

7072
**IMPORTANT:** The default configuration requires the release name and the tag to follow
7173
the convention `vX.X.X` (semantic versioning preceded by lowercase `v`). It will publish

docs/index.md

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ It is configured with all the following features:
1515

1616
This project doesn't currently use [tox](https://tox.wiki/en/4.11.4/index.html) or other matrix
1717
testing utilities. I prefer to run the tests only against the latest python locally, and run
18-
previous python versions directly in the CI pipeline to catch these bugs.
18+
previous python versions directly in the CI pipeline.
1919

2020
## How to use this repository template to create a new package
2121

@@ -27,17 +27,17 @@ previous python versions directly in the CI pipeline to catch these bugs.
2727
* Owner: The github repository owner (in this case `febus982`)
2828
* Repository name: The github repository name (in this case `bootstrap-python-package`)
2929
* Workflow name: `release.yml`
30-
* Create a GitHub Actions secret named `CODECLIMATE_REPORTER_ID` (at URL https://github.com/GITHUB_NAME_OR_ORGANIZATION/GITHUB_REPOSITORY/settings/secrets/actions)
31-
containing the codeclimate reporter id (you can find it at https://codeclimate.com/repos/YOUR_REPO_ID/settings/test_reporter).
32-
If you don't want to use CodeClimate just delete `workflows/python-quality.yml`.
33-
* Update the badges in `README.md`! (check [shields.io](https://shields.io/) for extra badges)
3430
* Setup local development:
3531
* Clone the repository
3632
* Install poetry `pip install poetry`
3733
* Install dev dependencies with `make dev-dependencies`
3834
* Setup GitHub pages (this need local development setup):
3935
* Initialise documentation branch `poetry run mike deploy dev latest --update-aliases --push`
40-
* Enable GitHub Actions for GitHub Pages (at URL https://github.com/GITHUB_NAME_OR_ORGANIZATION/GITHUB_REPOSITORY/settings/pages)
36+
* Configure GitHub Pages to deploy from the `gh-pages` branch (at URL `https://github.com/GITHUB_NAME_OR_ORGANIZATION/GITHUB_REPOSITORY/settings/pages`)
37+
* Create a GitHub Actions secret named `CODECLIMATE_REPORTER_ID` (at URL `https://github.com/GITHUB_NAME_OR_ORGANIZATION/GITHUB_REPOSITORY/settings/secrets/actions`)
38+
containing the codeclimate reporter id (you can find it at `https://codeclimate.com/repos/YOUR_REPO_ID/settings/test_reporter`).
39+
If you don't want to use CodeClimate just delete `workflows/python-quality.yml`.
40+
* Update the badges in `README.md`! (check [shields.io](https://shields.io/) for extra badges)
4141

4242
**IMPORTANT:** The repository is configured to deploy on the [test PyPI repository](https://test.pypi.org/).
4343
It's strongly recommended to create the project in the [test PyPI repository](https://test.pypi.org/) and test
@@ -50,8 +50,10 @@ This setup uses [poetry-dynamic-versioning](https://github.com/mtkennerly/poetry
5050
This means it's not necessary to commit the version in the code but the CI pipeline
5151
will infer it from the git tag.
5252

53-
To release a new version, just create a new release in the github repository. It will
54-
create a new tag and do all the magic.
53+
To release a new version, just create a new release and tag in the GitHub repository, to:
54+
55+
* Build and deploy the python package to PyPI
56+
* Build and deploy a new version of the documentation to GitHub pages
5557

5658
**IMPORTANT:** The default configuration requires the release name and the tag to follow
5759
the convention `vX.X.X` (semantic versioning preceded by lowercase `v`). It will publish

mkdocs-overrides/main.html

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{% extends "base.html" %}
2+
3+
{% block outdated %}
4+
You're not viewing the latest version.
5+
<a href="{{ '../' ~ base_url }}">
6+
<strong>Click here to go to latest.</strong>
7+
</a>
8+
{% endblock %}

mkdocs.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ plugins:
1313

1414
theme:
1515
name: material
16+
custom_dir: mkdocs-overrides
1617
features:
1718
- navigation.expand
1819
- navigation.top
@@ -21,13 +22,15 @@ theme:
2122
palette:
2223
# Palette toggle for light mode
2324
- scheme: default
25+
media: "(prefers-color-scheme: light)"
2426
primary: teal
2527
toggle:
2628
icon: material/brightness-7
2729
name: Switch to dark mode
2830

2931
# Palette toggle for dark mode
3032
- scheme: slate
33+
media: "(prefers-color-scheme: dark)"
3134
primary: teal
3235
toggle:
3336
icon: material/brightness-4
@@ -39,6 +42,7 @@ extra:
3942
link: https://www.linkedin.com/in/federico-b-a0b78232
4043
version:
4144
provider: mike
45+
default: stable
4246

4347
nav:
4448
- Home: index.md

0 commit comments

Comments
 (0)