jamstack 1.1.0__tar.gz → 2.0.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- jamstack-2.0.0/.editorconfig +9 -0
- jamstack-2.0.0/.github/workflows/ci.yml +59 -0
- jamstack-2.0.0/.github/workflows/release.yml +42 -0
- jamstack-2.0.0/.gitignore +134 -0
- jamstack-2.0.0/.pre-commit-config.yaml +19 -0
- jamstack-2.0.0/CHANGELOG.md +71 -0
- jamstack-2.0.0/CONTRIBUTING.md +77 -0
- {jamstack-1.1.0 → jamstack-2.0.0}/LICENSE +201 -201
- jamstack-2.0.0/PKG-INFO +216 -0
- jamstack-2.0.0/README.md +181 -0
- jamstack-2.0.0/docs/assets/extra.css +196 -0
- jamstack-2.0.0/docs/assets/favicon.png +0 -0
- jamstack-2.0.0/docs/assets/logo.png +0 -0
- jamstack-2.0.0/docs/assets/wordmark.png +0 -0
- jamstack-2.0.0/docs/cli.md +86 -0
- jamstack-2.0.0/docs/configuration.md +80 -0
- jamstack-2.0.0/docs/content.md +121 -0
- jamstack-2.0.0/docs/contributing.md +54 -0
- jamstack-2.0.0/docs/deployment.md +104 -0
- jamstack-2.0.0/docs/index.md +82 -0
- jamstack-2.0.0/docs/migration.md +149 -0
- jamstack-2.0.0/docs/themes.md +176 -0
- jamstack-2.0.0/docs/tutorial.md +185 -0
- jamstack-2.0.0/mkdocs.yml +61 -0
- jamstack-2.0.0/pyproject.toml +81 -0
- jamstack-2.0.0/src/jamstack/__about__.py +1 -0
- jamstack-2.0.0/src/jamstack/__init__.py +3 -0
- jamstack-2.0.0/src/jamstack/__main__.py +4 -0
- jamstack-2.0.0/src/jamstack/builder.py +70 -0
- jamstack-2.0.0/src/jamstack/cli.py +113 -0
- jamstack-2.0.0/src/jamstack/config.py +60 -0
- jamstack-2.0.0/src/jamstack/content.py +131 -0
- jamstack-2.0.0/src/jamstack/feed.py +75 -0
- jamstack-2.0.0/src/jamstack/render.py +12 -0
- jamstack-2.0.0/src/jamstack/server.py +92 -0
- jamstack-2.0.0/src/jamstack/theme.py +84 -0
- jamstack-2.0.0/src/jamstack/themes/blog/scaffold/content/posts/hello-world.md +9 -0
- jamstack-2.0.0/src/jamstack/themes/blog/static/style.css +186 -0
- jamstack-2.0.0/src/jamstack/themes/blog/templates/404.html +15 -0
- jamstack-2.0.0/src/jamstack/themes/blog/templates/base.html +22 -0
- jamstack-2.0.0/src/jamstack/themes/blog/templates/index.html +21 -0
- jamstack-2.0.0/src/jamstack/themes/blog/templates/page.html +3 -0
- jamstack-2.0.0/src/jamstack/themes/blog/templates/post.html +16 -0
- jamstack-2.0.0/src/jamstack/themes/blog/theme.toml +2 -0
- jamstack-2.0.0/src/jamstack/themes/minimal/static/style.css +137 -0
- jamstack-2.0.0/src/jamstack/themes/minimal/templates/404.html +11 -0
- jamstack-2.0.0/src/jamstack/themes/minimal/templates/base.html +21 -0
- jamstack-2.0.0/src/jamstack/themes/minimal/templates/index.html +17 -0
- jamstack-2.0.0/src/jamstack/themes/minimal/templates/page.html +11 -0
- jamstack-2.0.0/src/jamstack/themes/minimal/theme.toml +2 -0
- jamstack-2.0.0/tests/test_404.py +24 -0
- jamstack-2.0.0/tests/test_build.py +114 -0
- jamstack-2.0.0/tests/test_cli.py +72 -0
- jamstack-2.0.0/tests/test_config.py +45 -0
- jamstack-2.0.0/tests/test_content.py +72 -0
- jamstack-2.0.0/tests/test_feed.py +72 -0
- jamstack-2.0.0/tests/test_package.py +5 -0
- jamstack-2.0.0/tests/test_server.py +107 -0
- jamstack-2.0.0/tests/test_theme.py +58 -0
- jamstack-1.1.0/MANIFEST.in +0 -2
- jamstack-1.1.0/PKG-INFO +0 -96
- jamstack-1.1.0/README.md +0 -75
- jamstack-1.1.0/jamstack/__init__.py +0 -2
- jamstack-1.1.0/jamstack/__main__.py +0 -54
- jamstack-1.1.0/jamstack/__pycache__/__init__.cpython-38.pyc +0 -0
- jamstack-1.1.0/jamstack/__pycache__/__main__.cpython-38.pyc +0 -0
- jamstack-1.1.0/jamstack/api/__pycache__/file.cpython-38.pyc +0 -0
- jamstack-1.1.0/jamstack/api/__pycache__/template.cpython-38.pyc +0 -0
- jamstack-1.1.0/jamstack/api/file.py +0 -159
- jamstack-1.1.0/jamstack/api/template.py +0 -70
- jamstack-1.1.0/jamstack/jamdo/__pycache__/jamdo.cpython-38.pyc +0 -0
- jamstack-1.1.0/jamstack/jamdo/jamdo.py +0 -54
- jamstack-1.1.0/jamstack/sites/html5up/massively/info.json +0 -8
- jamstack-1.1.0/jamstack/sites/html5up/massively/settings.py +0 -14
- jamstack-1.1.0/jamstack/sites/html5up/massively/static.py +0 -42
- jamstack-1.1.0/jamstack/sites/html5up/massively/templates/index.html +0 -33
- jamstack-1.1.0/jamstack/sites/html5up/massively/templates/index2.html +0 -33
- jamstack-1.1.0/jamstack/sites/html5up/massively/templates/index3.html +0 -33
- jamstack-1.1.0/jamstack/sites/html5up/massively/templates/sections/bottom_scripts.html +0 -8
- jamstack-1.1.0/jamstack/sites/html5up/massively/templates/sections/footer.html +0 -48
- jamstack-1.1.0/jamstack/sites/html5up/massively/templates/sections/head_content.html +0 -5
- jamstack-1.1.0/jamstack/sites/html5up/massively/templates/sections/main.html +0 -17
- jamstack-1.1.0/jamstack/sites/html5up/massively/templates/sections/nav.html +0 -14
- jamstack-1.1.0/jamstack/sites/html5up/phantom/info.json +0 -74
- jamstack-1.1.0/jamstack/sites/html5up/phantom/posts.json +0 -76
- jamstack-1.1.0/jamstack/sites/html5up/phantom/settings.py +0 -6
- jamstack-1.1.0/jamstack/sites/html5up/phantom/static.py +0 -50
- jamstack-1.1.0/jamstack/sites/html5up/phantom/templates/elements.html +0 -397
- jamstack-1.1.0/jamstack/sites/html5up/phantom/templates/generic.html +0 -58
- jamstack-1.1.0/jamstack/sites/html5up/phantom/templates/index.html +0 -78
- jamstack-1.1.0/jamstack/sites/html5up/phantom/templates/post_template.html +0 -57
- jamstack-1.1.0/jamstack/sites/html5up/phantom/templates/sections/bottom_scripts.html +0 -5
- jamstack-1.1.0/jamstack/sites/html5up/phantom/templates/sections/footer.html +0 -34
- jamstack-1.1.0/jamstack/sites/html5up/phantom/templates/sections/head_content.html +0 -10
- jamstack-1.1.0/jamstack/sites/plain/info.json +0 -8
- jamstack-1.1.0/jamstack/sites/plain/settings.py +0 -5
- jamstack-1.1.0/jamstack/sites/plain/static.py +0 -35
- jamstack-1.1.0/jamstack/sites/plain/templates/index.html +0 -9
- jamstack-1.1.0/jamstack/sites/plain/templates/sections/body.html +0 -2
- jamstack-1.1.0/jamstack/sites/plain/templates/sections/head.html +0 -11
- jamstack-1.1.0/jamstack.egg-info/PKG-INFO +0 -96
- jamstack-1.1.0/jamstack.egg-info/SOURCES.txt +0 -50
- jamstack-1.1.0/jamstack.egg-info/dependency_links.txt +0 -1
- jamstack-1.1.0/jamstack.egg-info/entry_points.txt +0 -2
- jamstack-1.1.0/jamstack.egg-info/requires.txt +0 -5
- jamstack-1.1.0/jamstack.egg-info/top_level.txt +0 -1
- jamstack-1.1.0/requirements.txt +0 -5
- jamstack-1.1.0/setup.cfg +0 -7
- jamstack-1.1.0/setup.py +0 -49
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [stable, "2.0"]
|
|
6
|
+
pull_request:
|
|
7
|
+
|
|
8
|
+
concurrency:
|
|
9
|
+
group: ci-${{ github.ref }}
|
|
10
|
+
cancel-in-progress: true
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
lint:
|
|
14
|
+
runs-on: ubuntu-24.04
|
|
15
|
+
steps:
|
|
16
|
+
- uses: actions/checkout@v7
|
|
17
|
+
- uses: actions/setup-python@v7
|
|
18
|
+
with:
|
|
19
|
+
python-version: "3.13"
|
|
20
|
+
- run: pip install ruff
|
|
21
|
+
- run: ruff check .
|
|
22
|
+
- run: ruff format --check .
|
|
23
|
+
|
|
24
|
+
test:
|
|
25
|
+
runs-on: ubuntu-24.04
|
|
26
|
+
strategy:
|
|
27
|
+
fail-fast: false
|
|
28
|
+
matrix:
|
|
29
|
+
python-version: ["3.11", "3.12", "3.13", "3.14"]
|
|
30
|
+
steps:
|
|
31
|
+
- uses: actions/checkout@v7
|
|
32
|
+
- uses: actions/setup-python@v7
|
|
33
|
+
with:
|
|
34
|
+
python-version: ${{ matrix.python-version }}
|
|
35
|
+
- run: pip install -e ".[dev]"
|
|
36
|
+
- run: pytest --cov --cov-report=term-missing
|
|
37
|
+
|
|
38
|
+
commits:
|
|
39
|
+
if: github.event_name == 'pull_request'
|
|
40
|
+
runs-on: ubuntu-24.04
|
|
41
|
+
steps:
|
|
42
|
+
- uses: actions/checkout@v7
|
|
43
|
+
with:
|
|
44
|
+
fetch-depth: 0
|
|
45
|
+
- uses: actions/setup-python@v7
|
|
46
|
+
with:
|
|
47
|
+
python-version: "3.13"
|
|
48
|
+
- run: pip install commitizen
|
|
49
|
+
- run: cz check --rev-range origin/${{ github.base_ref }}..HEAD
|
|
50
|
+
|
|
51
|
+
docs:
|
|
52
|
+
runs-on: ubuntu-24.04
|
|
53
|
+
steps:
|
|
54
|
+
- uses: actions/checkout@v7
|
|
55
|
+
- uses: actions/setup-python@v7
|
|
56
|
+
with:
|
|
57
|
+
python-version: "3.13"
|
|
58
|
+
- run: pip install -e ".[dev]"
|
|
59
|
+
- run: zensical build --strict
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
name: Release
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags: ["v*"]
|
|
6
|
+
|
|
7
|
+
permissions:
|
|
8
|
+
contents: read
|
|
9
|
+
|
|
10
|
+
jobs:
|
|
11
|
+
build:
|
|
12
|
+
runs-on: ubuntu-latest
|
|
13
|
+
steps:
|
|
14
|
+
- uses: actions/checkout@v4
|
|
15
|
+
- uses: actions/setup-python@v5
|
|
16
|
+
with:
|
|
17
|
+
python-version: "3.13"
|
|
18
|
+
- run: pip install -e ".[dev]" build
|
|
19
|
+
- run: ruff check .
|
|
20
|
+
- run: ruff format --check .
|
|
21
|
+
- run: pytest
|
|
22
|
+
- name: Check version matches tag
|
|
23
|
+
run: |
|
|
24
|
+
python -c "import jamstack, os; assert jamstack.__version__ == os.environ['GITHUB_REF_NAME'].lstrip('v'), jamstack.__version__"
|
|
25
|
+
- run: python -m build
|
|
26
|
+
- uses: actions/upload-artifact@v4
|
|
27
|
+
with:
|
|
28
|
+
name: dist
|
|
29
|
+
path: dist/
|
|
30
|
+
|
|
31
|
+
publish:
|
|
32
|
+
needs: build
|
|
33
|
+
runs-on: ubuntu-latest
|
|
34
|
+
environment: pypi
|
|
35
|
+
permissions:
|
|
36
|
+
id-token: write
|
|
37
|
+
steps:
|
|
38
|
+
- uses: actions/download-artifact@v4
|
|
39
|
+
with:
|
|
40
|
+
name: dist
|
|
41
|
+
path: dist/
|
|
42
|
+
- uses: pypa/gh-action-pypi-publish@release/v1
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
# Byte-compiled / optimized / DLL files
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
*$py.class
|
|
5
|
+
.idea/
|
|
6
|
+
# C extensions
|
|
7
|
+
*.so
|
|
8
|
+
|
|
9
|
+
# Distribution / packaging
|
|
10
|
+
.Python
|
|
11
|
+
build/
|
|
12
|
+
develop-eggs/
|
|
13
|
+
/dist/
|
|
14
|
+
downloads/
|
|
15
|
+
eggs/
|
|
16
|
+
.eggs/
|
|
17
|
+
lib/
|
|
18
|
+
lib64/
|
|
19
|
+
parts/
|
|
20
|
+
sdist/
|
|
21
|
+
var/
|
|
22
|
+
wheels/
|
|
23
|
+
pip-wheel-metadata/
|
|
24
|
+
share/python-wheels/
|
|
25
|
+
*.egg-info/
|
|
26
|
+
.installed.cfg
|
|
27
|
+
*.egg
|
|
28
|
+
MANIFEST
|
|
29
|
+
|
|
30
|
+
# PyInstaller
|
|
31
|
+
# Usually these files are written by a python script from a template
|
|
32
|
+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
|
33
|
+
*.manifest
|
|
34
|
+
*.spec
|
|
35
|
+
|
|
36
|
+
# Installer logs
|
|
37
|
+
pip-log.txt
|
|
38
|
+
pip-delete-this-directory.txt
|
|
39
|
+
|
|
40
|
+
# Unit test / coverage reports
|
|
41
|
+
htmlcov/
|
|
42
|
+
.tox/
|
|
43
|
+
.nox/
|
|
44
|
+
.coverage
|
|
45
|
+
.coverage.*
|
|
46
|
+
.cache
|
|
47
|
+
nosetests.xml
|
|
48
|
+
coverage.xml
|
|
49
|
+
*.cover
|
|
50
|
+
*.py,cover
|
|
51
|
+
.hypothesis/
|
|
52
|
+
.pytest_cache/
|
|
53
|
+
|
|
54
|
+
# Translations
|
|
55
|
+
*.mo
|
|
56
|
+
*.pot
|
|
57
|
+
|
|
58
|
+
# Django stuff:
|
|
59
|
+
*.log
|
|
60
|
+
local_settings.py
|
|
61
|
+
db.sqlite3
|
|
62
|
+
db.sqlite3-journal
|
|
63
|
+
|
|
64
|
+
# Flask stuff:
|
|
65
|
+
instance/
|
|
66
|
+
.webassets-cache
|
|
67
|
+
|
|
68
|
+
# Scrapy stuff:
|
|
69
|
+
.scrapy
|
|
70
|
+
|
|
71
|
+
# Sphinx documentation
|
|
72
|
+
docs/_build/
|
|
73
|
+
|
|
74
|
+
# PyBuilder
|
|
75
|
+
target/
|
|
76
|
+
|
|
77
|
+
# Jupyter Notebook
|
|
78
|
+
.ipynb_checkpoints
|
|
79
|
+
|
|
80
|
+
# IPython
|
|
81
|
+
profile_default/
|
|
82
|
+
ipython_config.py
|
|
83
|
+
|
|
84
|
+
# pyenv
|
|
85
|
+
.python-version
|
|
86
|
+
|
|
87
|
+
# pipenv
|
|
88
|
+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
|
89
|
+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
|
90
|
+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
|
91
|
+
# install all needed dependencies.
|
|
92
|
+
#Pipfile.lock
|
|
93
|
+
|
|
94
|
+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow
|
|
95
|
+
__pypackages__/
|
|
96
|
+
|
|
97
|
+
# Celery stuff
|
|
98
|
+
celerybeat-schedule
|
|
99
|
+
celerybeat.pid
|
|
100
|
+
|
|
101
|
+
# SageMath parsed files
|
|
102
|
+
*.sage.py
|
|
103
|
+
|
|
104
|
+
# Environments
|
|
105
|
+
.env
|
|
106
|
+
.venv
|
|
107
|
+
env/
|
|
108
|
+
venv/
|
|
109
|
+
ENV/
|
|
110
|
+
env.bak/
|
|
111
|
+
venv.bak/
|
|
112
|
+
|
|
113
|
+
# Spyder project settings
|
|
114
|
+
.spyderproject
|
|
115
|
+
.spyproject
|
|
116
|
+
|
|
117
|
+
# Rope project settings
|
|
118
|
+
.ropeproject
|
|
119
|
+
|
|
120
|
+
# mkdocs documentation
|
|
121
|
+
/site
|
|
122
|
+
|
|
123
|
+
# mypy
|
|
124
|
+
.mypy_cache/
|
|
125
|
+
.dmypy.json
|
|
126
|
+
dmypy.json
|
|
127
|
+
|
|
128
|
+
# Pyre type checker
|
|
129
|
+
.pyre/
|
|
130
|
+
|
|
131
|
+
# Local tooling
|
|
132
|
+
.venv/
|
|
133
|
+
.ruff_cache/
|
|
134
|
+
site/
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
repos:
|
|
2
|
+
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
3
|
+
rev: v6.0.0
|
|
4
|
+
hooks:
|
|
5
|
+
- id: check-toml
|
|
6
|
+
- id: check-yaml
|
|
7
|
+
- id: end-of-file-fixer
|
|
8
|
+
- id: trailing-whitespace
|
|
9
|
+
- repo: https://github.com/astral-sh/ruff-pre-commit
|
|
10
|
+
rev: v0.17.4
|
|
11
|
+
hooks:
|
|
12
|
+
- id: ruff
|
|
13
|
+
args: [--fix]
|
|
14
|
+
- id: ruff-format
|
|
15
|
+
- repo: https://github.com/commitizen-tools/commitizen
|
|
16
|
+
rev: v4.19.3
|
|
17
|
+
hooks:
|
|
18
|
+
- id: commitizen
|
|
19
|
+
stages: [commit-msg]
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project are documented in this file.
|
|
4
|
+
|
|
5
|
+
## 2.0.0 (2026-11-07)
|
|
6
|
+
|
|
7
|
+
### Breaking
|
|
8
|
+
|
|
9
|
+
- The engine was rewritten. Projects built with `settings.py`, `static.py` or
|
|
10
|
+
the html5up themes must migrate to `site.toml` and `content/`; see
|
|
11
|
+
[the migration guide](docs/migration.md).
|
|
12
|
+
- Python 3.11 or newer is required.
|
|
13
|
+
- The html5up themes are no longer bundled or downloaded. 2.0 ships its own
|
|
14
|
+
`minimal` and `blog` themes.
|
|
15
|
+
|
|
16
|
+
### Features
|
|
17
|
+
|
|
18
|
+
- `jamstack init` creates a site from a bundled theme.
|
|
19
|
+
- `site.toml` configures the title, description, author, base URL, output
|
|
20
|
+
directory and theme.
|
|
21
|
+
- Markdown and Jinja pages in `content/` use TOML front matter and map to clean
|
|
22
|
+
URLs.
|
|
23
|
+
- `jamstack build` renders every page through Jinja with strict undefined
|
|
24
|
+
handling and copies the theme and project static files.
|
|
25
|
+
- Themes are discovered from the bundled set and from `themes/` in the project;
|
|
26
|
+
templates and static files can be overridden per project.
|
|
27
|
+
- `jamstack themes` lists the available themes and their origin.
|
|
28
|
+
- `jamstack serve` serves the output over HTTP and rebuilds when a source
|
|
29
|
+
changes.
|
|
30
|
+
- `sitemap.xml` and an Atom `feed.xml` are generated when `base_url` is set,
|
|
31
|
+
and themes can provide a `404.html`.
|
|
32
|
+
|
|
33
|
+
### Bug fixes
|
|
34
|
+
|
|
35
|
+
- `serve` keeps watching after a failed rebuild.
|
|
36
|
+
- `serve` flushes status messages when output is redirected.
|
|
37
|
+
|
|
38
|
+
## 1.1.0
|
|
39
|
+
|
|
40
|
+
* Bulk refactors and code documentation
|
|
41
|
+
* New commands for `static.py` files
|
|
42
|
+
* `--serve` for livewatch changes
|
|
43
|
+
* `--watch` for watch specific files and folders.
|
|
44
|
+
* `--port` especiffy serve port
|
|
45
|
+
|
|
46
|
+
## 1.0.0
|
|
47
|
+
|
|
48
|
+
* Back to namespace method for write templates names
|
|
49
|
+
* Example: `html5up/massively` instead of just `massively`
|
|
50
|
+
* Template assets are not included in the library to minimize the size of the library, they were moved to
|
|
51
|
+
a [separate repository](https://github.com/jamstackpy/jamstack-templates).
|
|
52
|
+
|
|
53
|
+
## 0.1.0
|
|
54
|
+
|
|
55
|
+
* Improve **Plain** template
|
|
56
|
+
* Add new templates (massively, phantom)
|
|
57
|
+
* When creating a project, instead of writing the template like this: **html5up/massively**, you can use the name
|
|
58
|
+
directly, i.e. **massively**
|
|
59
|
+
* The assets of each template are now included in the library
|
|
60
|
+
|
|
61
|
+
## 0.0.4
|
|
62
|
+
|
|
63
|
+
* Add README.md info
|
|
64
|
+
|
|
65
|
+
## 0.0.3
|
|
66
|
+
|
|
67
|
+
* Add plain template
|
|
68
|
+
|
|
69
|
+
## 0.0.1
|
|
70
|
+
|
|
71
|
+
* Initial release
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
# Contributing
|
|
2
|
+
|
|
3
|
+
## Development setup
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
git clone git@github.com:jamstackpy/jamstack.git
|
|
7
|
+
cd jamstack
|
|
8
|
+
git switch stable
|
|
9
|
+
python -m venv .venv
|
|
10
|
+
. .venv/bin/activate
|
|
11
|
+
pip install -e ".[dev]"
|
|
12
|
+
pre-commit install --hook-type pre-commit --hook-type commit-msg
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
Run the checks before opening a pull request:
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
ruff check .
|
|
19
|
+
ruff format --check .
|
|
20
|
+
pytest
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Commits
|
|
24
|
+
|
|
25
|
+
Commits follow [Conventional Commits](https://www.conventionalcommits.org/) in
|
|
26
|
+
English:
|
|
27
|
+
|
|
28
|
+
```
|
|
29
|
+
feat(cli): add a --drafts flag to build
|
|
30
|
+
fix(content): reject dates without a year
|
|
31
|
+
docs: explain local theme overrides
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
One commit is one reviewable intention. Do not mix unrelated changes under a
|
|
35
|
+
message that only describes one of them, and do not leave intermediate commits
|
|
36
|
+
that fail the tests. Mechanical changes (renames, formatting, dependency
|
|
37
|
+
bumps) go in their own commit.
|
|
38
|
+
|
|
39
|
+
Write a body when the change needs context: bullet points, in English,
|
|
40
|
+
explaining what and why. `commitizen` validates the message through the
|
|
41
|
+
`commit-msg` hook installed above.
|
|
42
|
+
|
|
43
|
+
## Pull requests
|
|
44
|
+
|
|
45
|
+
- Target the `stable` branch.
|
|
46
|
+
- Include a test for new behaviour; bug fixes should include the case that
|
|
47
|
+
reproduces the bug.
|
|
48
|
+
- Keep user-facing strings and documentation in English.
|
|
49
|
+
- Do not rewrite pushed history.
|
|
50
|
+
|
|
51
|
+
## Releasing
|
|
52
|
+
|
|
53
|
+
Publishing runs on tags through GitHub Actions and PyPI trusted publishing,
|
|
54
|
+
with no API tokens stored anywhere.
|
|
55
|
+
|
|
56
|
+
One-time setup:
|
|
57
|
+
|
|
58
|
+
1. On PyPI, open the `jamstack` project → Publishing → add a GitHub publisher
|
|
59
|
+
with owner `jamstackpy`, repository `jamstack`, workflow `release.yml`, and
|
|
60
|
+
environment `pypi`.
|
|
61
|
+
2. On GitHub, create an environment named `pypi` in the repository settings.
|
|
62
|
+
|
|
63
|
+
Releases use `cz bump`. It updates `src/jamstack/__about__.py`, rewrites
|
|
64
|
+
`CHANGELOG.md`, commits the result, and creates the tag in one step:
|
|
65
|
+
|
|
66
|
+
```bash
|
|
67
|
+
cz bump --increment patch # or minor, major
|
|
68
|
+
git push origin stable
|
|
69
|
+
git push origin v<version>
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
The `Release` workflow runs on tags matching `v*` and fails if the tag does not
|
|
73
|
+
match `src/jamstack/__about__.py`. Pre-releases work the same way with
|
|
74
|
+
`cz bump --prerelease rc`.
|
|
75
|
+
|
|
76
|
+
Review the generated section before pushing the tag. It is a draft: keep only
|
|
77
|
+
user-visible changes, list breaking changes first, and fix the wording.
|